-
Notifications
You must be signed in to change notification settings - Fork 249
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
Fix node freeze after re-enabling consensus [ERC-3111] #1592
Fix node freeze after re-enabling consensus [ERC-3111] #1592
Conversation
46700a5
to
8a213f1
Compare
Codecov Report
@@ Coverage Diff @@
## master #1592 +/- ##
==========================================
- Coverage 93.79% 93.57% -0.22%
==========================================
Files 204 204
Lines 30302 30304 +2
==========================================
- Hits 28421 28358 -63
- Misses 1881 1946 +65
Continue to review full report at Codecov.
|
Co-Authored-By: Ilya Bogdanov <ilya.bogdanov@xdev.re>
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.
Couple of nits as of 3c003d1.
exonum/src/node/consensus.rs
Outdated
@@ -857,6 +857,14 @@ impl NodeHandler { | |||
if let Some(peer) = self.state.retry(data, peer) { | |||
self.add_request_timeout(data.clone(), Some(peer)); | |||
|
|||
if !self.is_enabled { | |||
trace!( | |||
"Do not send a request {:?} because the node is paused.", |
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.
Nit: "Not sending a request..." makes more sense from the grammar perspective, I believe.
exonum/src/node/consensus.rs
Outdated
@@ -978,6 +986,11 @@ impl NodeHandler { | |||
/// Requests a block for the next height from all peers with a bigger height. Called when the | |||
/// node tries to catch up with other nodes' height. | |||
pub(crate) fn request_next_block(&mut self) { | |||
if !self.is_enabled { | |||
trace!("Do not send a request for the next block because the node is paused.",); |
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.
Nit: Bogus comma; also "Not sending a request..." would make more sense grammatically.
No description provided.