Allow fork choice to support multiple versions of a slot (#16266)

This commit is contained in:
carllin
2021-04-12 01:00:59 -07:00
committed by GitHub
parent ef30943c5c
commit dc7030ffaa
12 changed files with 2034 additions and 637 deletions

View File

@ -59,6 +59,10 @@ impl Vote {
pub fn last_voted_slot(&self) -> Option<Slot> {
self.slots.last().copied()
}
pub fn last_voted_slot_hash(&self) -> Option<(Slot, Hash)> {
self.slots.last().copied().map(|slot| (slot, self.hash))
}
}
#[derive(Serialize, Default, Deserialize, Debug, PartialEq, Eq, Clone, AbiExample)]