Skip to content

New hidden node option: --p2p-min-peer-software-version#2024

Merged
ImplOfAnImpl merged 1 commit intomasterfrom
p2p_specify_min_core_version
Mar 27, 2026
Merged

New hidden node option: --p2p-min-peer-software-version#2024
ImplOfAnImpl merged 1 commit intomasterfrom
p2p_specify_min_core_version

Conversation

@ImplOfAnImpl
Copy link
Copy Markdown
Contributor

If the option is specified and the peer's version is smaller, the peer will be disconnected immediately and discouraged.

The main use case for this is the fork detection script, where it can prevent it from connecting to legacy nodes (pre-1.1.0 for testnet and pre-1.2.0 for mainnet), which are already known to be on a fork.

Disconnect a peer given its id.

If it was an outbound connection, the peer address will be removed from the peer database,
and if the connection was inbound, the address will be kept.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: I haven't changed this. It's the original behavior, I just decided to document it.

@ImplOfAnImpl ImplOfAnImpl marked this pull request as ready for review March 13, 2026 09:36
@ImplOfAnImpl ImplOfAnImpl merged commit 7512b34 into master Mar 27, 2026
20 checks passed
@ImplOfAnImpl ImplOfAnImpl deleted the p2p_specify_min_core_version branch March 27, 2026 10:33
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.

2 participants