Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove libp2p protocol cache #259

Merged
merged 1 commit into from
Oct 4, 2021
Merged

remove libp2p protocol cache #259

merged 1 commit into from
Oct 4, 2021

Conversation

dirkmc
Copy link
Contributor

@dirkmc dirkmc commented Oct 4, 2021

libp2p has its own protocol cache, so there's no need to keep on external to libp2p

@dirkmc dirkmc force-pushed the refactor/remove-proto-cache branch from 37522d1 to ea61d80 Compare October 4, 2021 13:04
@dirkmc dirkmc force-pushed the refactor/remove-proto-cache branch from ea61d80 to cd4edc8 Compare October 4, 2021 13:05
@codecov-commenter
Copy link

Codecov Report

Merging #259 (ea61d80) into master (08cb9db) will decrease coverage by 0.02%.
The diff coverage is 60.00%.

❗ Current head ea61d80 differs from pull request most recent head cd4edc8. Consider uploading reports for the commit cd4edc8 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #259      +/-   ##
==========================================
- Coverage   67.83%   67.80%   -0.03%     
==========================================
  Files          24       24              
  Lines        3146     3134      -12     
==========================================
- Hits         2134     2125       -9     
+ Misses        652      649       -3     
  Partials      360      360              
Impacted Files Coverage Δ
network/libp2p_impl.go 65.60% <60.00%> (-0.67%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 08cb9db...cd4edc8. Read the comment docs.

@dirkmc dirkmc merged commit b5b774f into master Oct 4, 2021
@dirkmc dirkmc deleted the refactor/remove-proto-cache branch October 4, 2021 13:07
@dirkmc dirkmc mentioned this pull request Oct 4, 2021
func (impl *libp2pDataTransferNetwork) Disconnected(n network.Network, conn network.Conn) {
impl.clearPeerProtocol(conn.RemotePeer())
// Keep a string version of the protocols for performance reasons
impl.dtProtocolStrings = make([]string, 0, len(impl.dtProtocols))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dirkmc Why do we need this now ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because FirstSupportedProtocol(id, protos...) takes an array of strings (not an array of protocol.ID)

Copy link
Collaborator

@aarshkshah1992 aarshkshah1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants