Allow fork choice to support multiple versions of a slot (#16266)
This commit is contained in:
@@ -257,6 +257,7 @@ pub(crate) struct ForkStats {
|
||||
pub(crate) is_supermajority_confirmed: bool,
|
||||
pub(crate) computed: bool,
|
||||
pub(crate) lockout_intervals: LockoutIntervals,
|
||||
pub(crate) bank_hash: Option<Hash>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
@@ -398,6 +399,12 @@ impl ProgressMap {
|
||||
.map(|fork_progress| fork_progress.is_dead)
|
||||
}
|
||||
|
||||
pub fn get_hash(&self, slot: Slot) -> Option<Hash> {
|
||||
self.progress_map
|
||||
.get(&slot)
|
||||
.and_then(|fork_progress| fork_progress.fork_stats.bank_hash)
|
||||
}
|
||||
|
||||
pub fn is_propagated(&self, slot: Slot) -> bool {
|
||||
let leader_slot_to_check = self.get_latest_leader_slot(slot);
|
||||
|
||||
|
Reference in New Issue
Block a user