ClusterInfoVoteListener send only missing votes to BankingStage (#20873)

This commit is contained in:
carllin
2021-11-18 15:20:41 -08:00
committed by GitHub
parent e9c00d1e69
commit b30c94ce55
10 changed files with 813 additions and 239 deletions

View File

@ -34,6 +34,9 @@ impl SlotHashes {
slot_hashes.sort_by(|(a, _), (b, _)| b.cmp(a));
Self(slot_hashes)
}
pub fn slot_hashes(&self) -> &[SlotHash] {
&self.0
}
}
impl FromIterator<(Slot, Hash)> for SlotHashes {

View File

@ -32,6 +32,11 @@ impl Signature {
Self(GenericArray::clone_from_slice(signature_slice))
}
pub fn new_unique() -> Self {
let random_bytes: Vec<u8> = (0..64).map(|_| rand::random::<u8>()).collect();
Self::new(&random_bytes)
}
pub(self) fn verify_verbose(
&self,
pubkey_bytes: &[u8],