-
Notifications
You must be signed in to change notification settings - Fork 73
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 Refactor connections management #1187
Conversation
plugins/net_plugin/net_plugin.cpp
Outdated
if( cptr != connections.end() ) { | ||
auto cstart_it = cptr; | ||
do { | ||
// select the first one which is current and has lib above current and break out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no indentation in this do-while body?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how that happened. Fixed.
} | ||
|
||
void net_plugin::register_update_p2p_connection_metrics(std::function<void(net_plugin::p2p_connections_metrics)>&& fun){ | ||
my->update_p2p_connection_metrics = std::move(fun); | ||
// called from any thread |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment here saying a lock is in another start_conn_timer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment
plugins/net_plugin/net_plugin.cpp
Outdated
continue; | ||
} | ||
} else { | ||
--num_clients; ++num_rm; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No indentation here.
…nd for_each_block_connection to not short circuit
Refactor connections set into a
connections_manager
class.Simplify connections monitor timer implementation.
In preparation of work on #1072.