Skip to content

Commit

Permalink
fix possible round overflow (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
akichidis authored Jul 15, 2022
1 parent 1474264 commit daa44a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion narwhal/consensus/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl<PublicKey: VerifyingKey> ConsensusState<PublicKey> {
gc_depth: Round,
) -> Dag<PublicKey> {
let mut dag: Dag<PublicKey> = HashMap::new();
let min_round = last_committed_round - gc_depth;
let min_round = last_committed_round.saturating_sub(gc_depth);
let cert_map = cert_store
.iter(Some(Box::new(move |(_dig, cert)| {
cert.header.round > min_round
Expand Down

0 comments on commit daa44a3

Please sign in to comment.