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

Fix node freeze after re-enabling consensus [ERC-3111] #1592

Merged

Conversation

alekseysidorov
Copy link
Contributor

No description provided.

@alekseysidorov alekseysidorov added bug 🪲 work in progress 🚧 Incoming changes expected: pull request isn't ready for the final review. update changelog core Changes affecting exonum core labels Dec 4, 2019
@alekseysidorov alekseysidorov removed the work in progress 🚧 Incoming changes expected: pull request isn't ready for the final review. label Dec 4, 2019
CHANGELOG.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Dec 4, 2019

Codecov Report

Merging #1592 into master will decrease coverage by 0.21%.
The diff coverage is 25%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
exonum/src/node/events.rs 62.33% <ø> (-18.16%) ⬇️
exonum/src/sandbox/consensus/recovery.rs 90.03% <ø> (-9.23%) ⬇️
exonum/src/node/consensus.rs 85.47% <25%> (-0.51%) ⬇️
exonum/src/events/mod.rs 86.76% <0%> (-4.42%) ⬇️
exonum/src/api/node/mod.rs 75% <0%> (-4%) ⬇️
exonum/src/sandbox/sandbox_tests_helper.rs 93.9% <0%> (-1.53%) ⬇️
exonum/src/sandbox/mod.rs 94.39% <0%> (-0.96%) ⬇️
exonum/src/events/network.rs 88.13% <0%> (-0.57%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2d5d01...9dbace3. Read the comment docs.

@alekseysidorov alekseysidorov added this to the Release 0.13 milestone Dec 4, 2019
CHANGELOG.md Outdated Show resolved Hide resolved
Co-Authored-By: Ilya Bogdanov <ilya.bogdanov@xdev.re>
@alekseysidorov alekseysidorov changed the title Fix node free after reenable consensus [ERC-3111] Fix node freeze after re-enabling consensus [ERC-3111] Dec 4, 2019
Copy link
Contributor

@slowli slowli left a 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.

@@ -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.",
Copy link
Contributor

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.

@@ -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.",);
Copy link
Contributor

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.

@aleksuss aleksuss merged commit 45c3153 into exonum:master Dec 4, 2019
aleksuss pushed a commit to aleksuss/exonum that referenced this pull request Dec 4, 2019
@alekseysidorov alekseysidorov deleted the hotfix_consensus_reenable_bug branch December 23, 2019 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 core Changes affecting exonum core update changelog
Development

Successfully merging this pull request may close these issues.

5 participants