fn track_optimistic_confirmation_vote(
        vote_tracker: &VoteTracker,
        slot: Slot,
        hash: Hash,
        pubkey: Arc<Pubkey>,
        stake: u64,
        total_epoch_stake: u64,
    ) -> (bool, bool) {
        let slot_tracker = vote_tracker.get_or_insert_slot_tracker(slot);
        // Insert vote and check for optimistic confirmation
        let mut w_slot_tracker = slot_tracker.write().unwrap();

        w_slot_tracker
            .get_or_insert_optimistic_votes_tracker(hash)
            .add_vote_pubkey(pubkey, stake, total_epoch_stake)
    }
// Returns if the slot was optimistically confirmed, and whether
// the slot was new
Returns if the slot was optimistically confirmed, and whether
the slot was new
Returns if the slot was optimistically confirmed and whether the slot was new
fn track_optimistic_confirmation_vote(
        vote_tracker: &VoteTracker,
        slot: Slot,
        hash: Hash,
        pubkey: Arc<Pubkey>,
        stake: u64,
        total_epoch_stake: u64,
    ) -> (bool, bool) {
        let slot_tracker = vote_tracker.get_or_insert_slot_tracker(slot);
        // Insert vote and check for optimistic confirmation
        let mut w_slot_tracker = slot_tracker.write().unwrap();
        w_slot_tracker
            .get_or_insert_optimistic_votes_tracker(hash)
            .add_vote_pubkey(pubkey, stake, total_epoch_stake)
    }
fn track_optimistic_confirmation_vote ( vote_tracker : & VoteTracker , slot : Slot , hash : Hash , pubkey : Arc < Pubkey > , stake : u64 , total_epoch_stake : u64 , ) -> ( bool , bool ) { let slot_tracker = vote_tracker . get_or_insert_slot_tracker ( slot ) ; // Insert vote and check for optimistic confirmation let mut w_slot_tracker = slot_tracker . write ( ) . unwrap ( ) ; w_slot_tracker . get_or_insert_optimistic_votes_tracker ( hash ) . add_vote_pubkey ( pubkey , stake , total_epoch_stake ) }
Returns if the slot was optimistically confirmed, and whether
the slot was new
Returns if the slot was optimistically confirmed and whether the slot was new
vote_tracker
&VoteTracker
slot
Slot
hash
Hash
pubkey
Arc<Pubkey>
stake
u64
total_epoch_stake
u64