Trait solana_core::fork_choice::ForkChoice
source · [−]pub trait ForkChoice {
type ForkChoiceKey;
fn compute_bank_stats(
&mut self,
bank: &Bank,
tower: &Tower,
latest_validator_votes_for_frozen_banks: &mut LatestValidatorVotesForFrozenBanks
);
fn select_forks(
&self,
frozen_banks: &[Arc<Bank>],
tower: &Tower,
progress: &ProgressMap,
ancestors: &HashMap<u64, HashSet<u64>>,
bank_forks: &RwLock<BankForks>
) -> (Arc<Bank>, Option<Arc<Bank>>);
fn mark_fork_invalid_candidate(
&mut self,
invalid_slot: &Self::ForkChoiceKey
);
fn mark_fork_valid_candidate(
&mut self,
valid_slot: &Self::ForkChoiceKey
) -> Vec<Self::ForkChoiceKey>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
;
}
Associated Types
type ForkChoiceKey
Required methods
fn compute_bank_stats(
&mut self,
bank: &Bank,
tower: &Tower,
latest_validator_votes_for_frozen_banks: &mut LatestValidatorVotesForFrozenBanks
)
fn select_forks(
&self,
frozen_banks: &[Arc<Bank>],
tower: &Tower,
progress: &ProgressMap,
ancestors: &HashMap<u64, HashSet<u64>>,
bank_forks: &RwLock<BankForks>
) -> (Arc<Bank>, Option<Arc<Bank>>)
fn mark_fork_invalid_candidate(&mut self, invalid_slot: &Self::ForkChoiceKey)
fn mark_fork_valid_candidate(
&mut self,
valid_slot: &Self::ForkChoiceKey
) -> Vec<Self::ForkChoiceKey>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn mark_fork_valid_candidate(
&mut self,
valid_slot: &Self::ForkChoiceKey
) -> Vec<Self::ForkChoiceKey>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Returns any newly duplicate confirmed ancestors of valid_slot
up to and including
valid_slot
itself