-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
37522d1
to
ea61d80
Compare
ea61d80
to
cd4edc8
Compare
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
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)) |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
libp2p has its own protocol cache, so there's no need to keep on external to libp2p