in librabft-v2/src/record_store.rs [766:799]
fn known_quorum_certificate_rounds(&self) -> BTreeSet<Round> {
let highest_qc_hash = self.highest_quorum_certificate_hash;
let highest_cc_hash = self
.highest_commit_certificate_hash
.unwrap_or(self.initial_hash);
let mut result = BTreeSet::new();
for n in self
.ancestor_rounds(highest_qc_hash)
.enumerate()
.filter_map(|(i, x)| {
if crate::util::is_power2_minus1(i) {
Some(x)
} else {
None
}
})
{
result.insert(n);
}
for n in self
.ancestor_rounds(highest_cc_hash)
.enumerate()
.filter_map(|(i, x)| {
if crate::util::is_power2_minus1(i) {
Some(x)
} else {
None
}
})
{
result.insert(n);
}
result
}