Struct solana_core::vote_simulator::VoteSimulator
source · pub struct VoteSimulator {
pub validator_keypairs: HashMap<Pubkey, ValidatorVoteKeypairs>,
pub node_pubkeys: Vec<Pubkey>,
pub vote_pubkeys: Vec<Pubkey>,
pub bank_forks: Arc<RwLock<BankForks>>,
pub progress: ProgressMap,
pub heaviest_subtree_fork_choice: HeaviestSubtreeForkChoice,
pub latest_validator_votes_for_frozen_banks: LatestValidatorVotesForFrozenBanks,
}Fields§
§validator_keypairs: HashMap<Pubkey, ValidatorVoteKeypairs>§node_pubkeys: Vec<Pubkey>§vote_pubkeys: Vec<Pubkey>§bank_forks: Arc<RwLock<BankForks>>§progress: ProgressMap§heaviest_subtree_fork_choice: HeaviestSubtreeForkChoice§latest_validator_votes_for_frozen_banks: LatestValidatorVotesForFrozenBanksImplementations§
source§impl VoteSimulator
impl VoteSimulator
pub fn new(num_keypairs: usize) -> Self
pub fn fill_bank_forks( &mut self, forks: Tree<u64>, cluster_votes: &HashMap<Pubkey, Vec<u64>>, is_frozen: bool )
pub fn simulate_vote( &mut self, vote_slot: Slot, my_pubkey: &Pubkey, tower: &mut Tower ) -> Vec<HeaviestForkFailures>
pub fn set_root(&mut self, new_root: Slot)
pub fn create_and_vote_new_branch( &mut self, start_slot: Slot, end_slot: Slot, cluster_votes: &HashMap<Pubkey, Vec<u64>>, votes_to_simulate: &HashSet<Slot>, my_pubkey: &Pubkey, tower: &mut Tower ) -> HashMap<Slot, Vec<HeaviestForkFailures>>
pub fn simulate_lockout_interval( &mut self, slot: Slot, lockout_interval: (u64, u64), vote_account_pubkey: &Pubkey )
pub fn can_progress_on_fork( &mut self, my_pubkey: &Pubkey, tower: &mut Tower, start_slot: u64, num_slots: u64, cluster_votes: &mut HashMap<Pubkey, Vec<u64>> ) -> bool
Auto Trait Implementations§
impl RefUnwindSafe for VoteSimulator
impl Send for VoteSimulator
impl Sync for VoteSimulator
impl Unpin for VoteSimulator
impl UnwindSafe for VoteSimulator
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Requestsource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request