Skip to content

Commit

Permalink
Clear upons upon round, not block
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed Apr 28, 2024
1 parent 65df36b commit 85aece2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions coordinator/tributary/tendermint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ impl<N: Network + 'static> TendermintMachine<N> {

// Start a new round. Returns true if we were the proposer
fn round(&mut self, round: RoundNumber, time: Option<CanonicalInstant>) -> bool {
// Clear upons
self.upons = Upons {
upon_prevotes: false,
upon_successful_current_round_prevotes: false,
upon_negative_current_round_prevotes: false,
upon_precommits: false,
};

let proposer = self.weights.proposer(self.block.number, round);
let res = if let Some(data) = self.block.new_round(round, proposer, time) {
self.broadcast(data);
Expand Down Expand Up @@ -364,14 +372,6 @@ impl<N: Network + 'static> TendermintMachine<N> {
proposal,
);

// Clear upons
self.upons = Upons {
upon_prevotes: false,
upon_successful_current_round_prevotes: false,
upon_negative_current_round_prevotes: false,
upon_precommits: false,
};

// Start the first round
self.round(RoundNumber(0), Some(round_end));
}
Expand Down

0 comments on commit 85aece2

Please sign in to comment.