Skip to content

Commit

Permalink
consensus: change CertificateInfo::add_sv to CertificateInfo::set_sv
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia committed Feb 9, 2024
1 parent 9c6a7e9 commit 0ab78c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions consensus/src/step_votes_reg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ impl CertificateInfo {
}
}

pub(crate) fn add_sv(
/// Set certificate stepvotes according to [step]. Store [quorum_reached] to
/// calculate [CertificateInfo::is_ready]
pub(crate) fn set_sv(
&mut self,
iter: u8,
sv: StepVotes,
Expand Down Expand Up @@ -164,7 +166,7 @@ impl CertInfoRegistry {

let cert_info = cert.get_or_insert(vote);

cert_info.add_sv(iteration, sv, step, quorum_reached);
cert_info.set_sv(iteration, sv, step, quorum_reached);
cert_info
.is_ready()
.then(|| Self::build_quorum_msg(&self.ru, iteration, cert_info))
Expand Down

0 comments on commit 0ab78c4

Please sign in to comment.