-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
WIP: Introduce PeerConnManager
to manage peer connections
#7283
Draft
yyforyongyu
wants to merge
34
commits into
lightningnetwork:master
Choose a base branch
from
yyforyongyu:peer-conn-manager
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
WIP: Introduce PeerConnManager
to manage peer connections
#7283
yyforyongyu
wants to merge
34
commits into
lightningnetwork:master
from
yyforyongyu:peer-conn-manager
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think this could build off of #5700 ? |
Yeah was going to mention #5700 here, cc @ellemouton |
Also add start and stop methods for peer conn manager.
This commit also moves the initialization of `PeerConnManager` after channel router is created.
This commit moves the shutdown process of `connMgr` into the peer conn manager's shutdown. It also moves the peer disconnection inside peer conn manager's shutdown to make sure the disconnection is successful.
Also move some of the fields from `PeerConnManager` to `PeerConnManagerConfig`.
This commit moves the peer conn manager related code to `conn_manager.go` and updates the error used. Changes inside `server.go` is a pure code moving.
This commit renames `PeerConnManager` and `PeerConnManagerConfig` to `Manager` and `ManagerConfig` by the request of the linter `revive`.
yyforyongyu
force-pushed
the
peer-conn-manager
branch
from
October 13, 2023 13:32
d27ddfc
to
a122f37
Compare
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR attempts to fix #6788 by first moving the peer connection-related code into its dedicated package. The moving process is surprisingly smooth as the peer conn manager is already hidden in
server.go
, we only need to peel it off from the file and make it a dedicated service.Commits are made in a way so they're easy to follow and digest, let me know if they are too small.
TODO: