-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[Draft] Improve (dis-)connect handling between peers #3902
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
base: staging
Are you sure you want to change the base?
Conversation
|
Some of the goals of this PR are achieved with #3900 (which is also a bugfix). In addition, I can see that some of the changes here are conflicting with the aforementioned PR, which deduplicates some of the related code. That being said, the idea to introduce a new, concrete error type is solid, and so is the
|
|
Agreed with all of the above except:
Please no refactors unless agreed upon and resolving an existing issue. |
Fair enough; I was mostly thinking about the prospect of a new node type ( |
2540eb9 to
a43475f
Compare
6e30d1b to
d5b7767
Compare
a44a36e to
3772564
Compare
3772564 to
9ca9004
Compare
9ca9004 to
9d514fd
Compare
9d514fd to
cddd288
Compare
Fixes #3893.
The main purpose of this PR is to propagate errors during handshakes up, so the error is logged at the appropriate location. It also enables filtering out benign errors such as "Already connecting".
Additionally, the PR adds a four new disconnect reasons "already connecting", "already connected", "connecting to myself", "no untrusted external peers allowed". This avoids those confusing
peer disconnected before sending "Message::ChallengeResponse"messages.