Skip to content

Commit

Permalink
Schedule expedited proposals only if we're the leader [ECR-2038] (exo…
Browse files Browse the repository at this point in the history
…num#851)

A node should not attempt to schedule a proposal on each transaction
if it is not a leader. It will not work, the other nodes will notice
this and will complain with errors in logs. We don't want that.
  • Loading branch information
ilammy authored and stanislav-tkach committed Aug 7, 2018
1 parent daee392 commit 674cbad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exonum/src/node/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,9 @@ impl NodeHandler {
.merge(fork.into_patch())
.expect("Unable to save transaction to persistent pool.");

self.maybe_add_propose_timeout();
if self.state.is_leader() {
self.maybe_add_propose_timeout();
}

let full_proposes = self.state.check_incomplete_proposes(hash);
// Go to handle full propose if we get last transaction.
Expand Down

0 comments on commit 674cbad

Please sign in to comment.