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

Priority nodes #2891

Draft
wants to merge 7 commits into
base: testnet
Choose a base branch
from
Draft

Priority nodes #2891

wants to merge 7 commits into from

Conversation

mfrankovi
Copy link
Contributor

@mfrankovi mfrankovi commented Nov 19, 2024

Reduce number of max connected nodes and add priority nodes config which allows priority nodes always connecting

@mfrankovi mfrankovi changed the title Disconnect versions before 1.12.1 Priority nodes Nov 20, 2024
Comment on lines +78 to +84
if (node_major_version < 1 || (node_major_version == 1 && node_minor_version < 12) ||
(node_major_version == 1 && node_minor_version == 12 && node_patch_version < 1)) {
LOG(log_er_) << "Disconnect node which is not at least 1.12.1";
disconnect(packet_data.from_node_id_, dev::p2p::UserReason);
return;
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should put TODO here to remove before merging to master

@@ -39,6 +39,9 @@ struct NetworkConfig {
if (!publicIPAddress.empty() && !isPublicAddress(publicIPAddress)) BOOST_THROW_EXCEPTION(InvalidPublicIPAddress());
}

/// Priority Nodes
std::unordered_set<dev::p2p::NodeID> priority_nodes;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this could be const

@mfrankovi mfrankovi marked this pull request as draft November 20, 2024 15:23
@mfrankovi mfrankovi marked this pull request as ready for review November 27, 2024 07:36
@mfrankovi mfrankovi marked this pull request as draft November 27, 2024 07:36
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