fn process_gossip_duplicate_confirmed_slots(
        gossip_duplicate_confirmed_slots_receiver: &GossipDuplicateConfirmedSlotsReceiver,
        gossip_duplicate_confirmed_slots: &mut GossipDuplicateConfirmedSlots,
        bank_forks: &RwLock<BankForks>,
        progress: &mut ProgressMap,
        fork_choice: &mut HeaviestSubtreeForkChoice,
        ancestors: &HashMap<Slot, HashSet<Slot>>,
        descendants: &HashMap<Slot, HashSet<Slot>>,
    ) {
        let root = bank_forks.read().unwrap().root();
        for new_confirmed_slots in gossip_duplicate_confirmed_slots_receiver.try_iter() {
            for (confirmed_slot, confirmed_hash) in new_confirmed_slots {
                if confirmed_slot <= root {
                    continue;
                } else if let Some(prev_hash) =
                    gossip_duplicate_confirmed_slots.insert(confirmed_slot, confirmed_hash)
                {
                    assert_eq!(prev_hash, confirmed_hash);
                    // Already processed this signal
                    return;
                }

                check_slot_agrees_with_cluster(
                    confirmed_slot,
                    root,
                    bank_forks
                        .read()
                        .unwrap()
                        .get(confirmed_slot)
                        .map(|b| b.hash()),
                    gossip_duplicate_confirmed_slots,
                    ancestors,
                    descendants,
                    progress,
                    fork_choice,
                    SlotStateUpdate::DuplicateConfirmed,
                );
            }
        }
    }
// Check for any newly confirmed slots by the cluster. This is only detects
// optimistic and in the future, duplicate slot confirmations on the exact
// single slots and does not account for votes on their descendants. Used solely
// for duplicate slot recovery.
Check for any newly confirmed slots by the cluster. This is only detects
optimistic and in the future, duplicate slot confirmations on the exact
single slots and does not account for votes on their descendants. Used solely
for duplicate slot recovery.
Check for any newly confirmed slots by the cluster . This is only detects optimistic and in the future duplicate slot confirmations on the exact single slots and does not account for votes on their descendants . Used solely for duplicate slot recovery .
fn process_gossip_duplicate_confirmed_slots(
        gossip_duplicate_confirmed_slots_receiver: &GossipDuplicateConfirmedSlotsReceiver,
        gossip_duplicate_confirmed_slots: &mut GossipDuplicateConfirmedSlots,
        bank_forks: &RwLock<BankForks>,
        progress: &mut ProgressMap,
        fork_choice: &mut HeaviestSubtreeForkChoice,
        ancestors: &HashMap<Slot, HashSet<Slot>>,
        descendants: &HashMap<Slot, HashSet<Slot>>,
    ) {
        let root = bank_forks.read().unwrap().root();
        for new_confirmed_slots in gossip_duplicate_confirmed_slots_receiver.try_iter() {
            for (confirmed_slot, confirmed_hash) in new_confirmed_slots {
                if confirmed_slot <= root {
                    continue;
                } else if let Some(prev_hash) =
                    gossip_duplicate_confirmed_slots.insert(confirmed_slot, confirmed_hash)
                {
                    assert_eq!(prev_hash, confirmed_hash);
                    // Already processed this signal
                    return;
                }
                check_slot_agrees_with_cluster(
                    confirmed_slot,
                    root,
                    bank_forks
                        .read()
                        .unwrap()
                        .get(confirmed_slot)
                        .map(|b| b.hash()),
                    gossip_duplicate_confirmed_slots,
                    ancestors,
                    descendants,
                    progress,
                    fork_choice,
                    SlotStateUpdate::DuplicateConfirmed,
                );
            }
        }
    }
fn process_gossip_duplicate_confirmed_slots ( gossip_duplicate_confirmed_slots_receiver : & GossipDuplicateConfirmedSlotsReceiver , gossip_duplicate_confirmed_slots : & mut GossipDuplicateConfirmedSlots , bank_forks : & RwLock < BankForks > , progress : & mut ProgressMap , fork_choice : & mut HeaviestSubtreeForkChoice , ancestors : & HashMap < Slot , HashSet < Slot > > , descendants : & HashMap < Slot , HashSet < Slot > > , ) { let root = bank_forks . read ( ) . unwrap ( ) . root ( ) ; for new_confirmed_slots in gossip_duplicate_confirmed_slots_receiver . try_iter ( ) { for ( confirmed_slot , confirmed_hash ) in new_confirmed_slots { if confirmed_slot <= root { continue ; } else if let Some ( prev_hash ) = gossip_duplicate_confirmed_slots . insert ( confirmed_slot , confirmed_hash ) { assert_eq ! ( prev_hash confirmed_hash ) ; // Already processed this signal return ; } check_slot_agrees_with_cluster ( confirmed_slot , root , bank_forks . read ( ) . unwrap ( ) . get ( confirmed_slot ) . map ( | b | b . hash ( ) ) , gossip_duplicate_confirmed_slots , ancestors , descendants , progress , fork_choice , SlotStateUpdate :: DuplicateConfirmed , ) ; } } }
Check for any newly confirmed slots by the cluster.
Check for any newly confirmed slots by the cluster .
gossip_duplicate_confirmed_slots_receiver
&GossipDuplicateConfirmedSlotsReceiver
gossip_duplicate_confirmed_slots
&mut GossipDuplicateConfirmedSlots
bank_forks
&RwLock<BankForks>
progress
&mut ProgressMap
fork_choice
&mut HeaviestSubtreeForkChoice
ancestors
&HashMap<Slot, HashSet<Slot>>
descendants
&HashMap<Slot, HashSet<Slot>>
gossip_duplicate_confirmed_slots_receiver
&GossipDuplicateConfirmedSlotsReceiver
gossip_duplicate_confirmed_slots
&mut GossipDuplicateConfirmedSlots
bank_forks
&RwLock<BankForks>
progress
&mut ProgressMap
fork_choice
&mut HeaviestSubtreeForkChoice
ancestors
&HashMap<Slot, HashSet<Slot>>
descendants
&HashMap<Slot, HashSet<Slot>>