Skip to content

p2p: reset disconnect set with magic enode ID#2144

Merged
zzzckck merged 1 commit intobnb-chain:developfrom
weiihann:develop/explicit-disc
Jan 22, 2024
Merged

p2p: reset disconnect set with magic enode ID#2144
zzzckck merged 1 commit intobnb-chain:developfrom
weiihann:develop/explicit-disc

Conversation

@weiihann
Copy link
Copy Markdown
Contributor

@weiihann weiihann commented Jan 9, 2024

Description

Related to #2140.

This PR adds a small feature to reset the disconnect enode set by removing a peer (i.e. via admin_removePeer) using a hardcoded enode ID.

Rationale

Previously, the only way to reset the disconnect enode set was to restart the node. This may not be very inconvenient. Hence, we need a mechanism to reset the set without restarting the node.

By sending a hardcoded "magic" enode ID as a parameter to admin_removePeer, the set will be reset. The hardcoded "magic" enode ID is referenced from the test cases.

@weiihann weiihann requested review from MatusKysel and zzzckck January 9, 2024 05:32
MatusKysel
MatusKysel previously approved these changes Jan 9, 2024
@weiihann weiihann force-pushed the develop/explicit-disc branch from c7a2d84 to 0e85c86 Compare January 9, 2024 11:06
@weiihann weiihann changed the title p2p: disconnect itself will reset the disconnect list p2p: reset disconnect set with magic enode ID Jan 9, 2024
@weiihann weiihann force-pushed the develop/explicit-disc branch from 263b7cd to 0e85c86 Compare January 10, 2024 08:54
@zzzckck zzzckck merged commit d102001 into bnb-chain:develop Jan 22, 2024
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