Skip to content
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

p2p: reset disconnect set with magic enode ID #2144

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

weiihann
Copy link
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
p2p/server.go Outdated Show resolved Hide resolved
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
p2p/server.go Show resolved Hide resolved
@zzzckck zzzckck merged commit d102001 into bnb-chain:develop Jan 22, 2024
10 checks passed
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