Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Addressed
libp2p's latest release forces a quite big refactor on our lighthouse network crate mainly because of the deprecation of the
NetworkBehaviourEventProcess
. While doing this, I'll need to removeInternalBehaviourMessage
. This PR removes one of the variants:DialPeer
moving dialing from the mainBehaviour
to thePeerManager
.Proposed Changes
This change should maintain essentially the same over-all behaviour:
Before we would tell the peer manager to set a peer as dialing and queue an internal behaviour event to emit the Dial
NBAction
. The way the derive macro forNetworkBehaviour
works is by polling each sub-behaviour in the order they are defined and then calling the custom poll function. Since the peer manager is the last behaviour, having the dial at the beginning of the custom poll function and at the end of the poll for the peer manager should be equivalent.Additional Info
na