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>>) {
        let r_bank_forks = bank_forks.read().unwrap();

        (
            r_bank_forks.get(self.best_overall_slot()).unwrap().clone(),
            self.heaviest_slot_on_same_voted_fork(tower)
                .map(|heaviest_slot_on_same_voted_fork| {
                    r_bank_forks
                        .get(heaviest_slot_on_same_voted_fork)
                        .unwrap()
                        .clone()
                }),
        )
    }
// Returns:
// 1) The heaviest overall bank
// 2) The heaviest bank on the same fork as the last vote (doesn't require a
// switching proof to vote for)
1) The heaviest overall bank
2) The heaviest bank on the same fork as the last vote (doesn't require a
switching proof to vote for)
1 ) The heaviest overall bank 2 ) The heaviest bank on the same fork as the last vote ( doesn ' t require a switching proof to vote for )
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>>) {
        let r_bank_forks = bank_forks.read().unwrap();
        (
            r_bank_forks.get(self.best_overall_slot()).unwrap().clone(),
            self.heaviest_slot_on_same_voted_fork(tower)
                .map(|heaviest_slot_on_same_voted_fork| {
                    r_bank_forks
                        .get(heaviest_slot_on_same_voted_fork)
                        .unwrap()
                        .clone()
                }),
        )
    }
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 > > ) { let r_bank_forks = bank_forks . read ( ) . unwrap ( ) ; ( r_bank_forks . get ( self . best_overall_slot ( ) ) . unwrap ( ) . clone ( ) , self . heaviest_slot_on_same_voted_fork ( tower ) . map ( | heaviest_slot_on_same_voted_fork | { r_bank_forks . get ( heaviest_slot_on_same_voted_fork ) . unwrap ( ) . clone ( ) } ) , ) }
Returns:
1) The heaviest overall bank
2) The heaviest bank on the same fork as the last vote (doesn't require a
switching proof to vote for)
Returns : 1 ) The heaviest overall bank 2 ) The heaviest bank on the same fork as the last vote ( doesn ' t require a switching proof to vote for )
&self
_frozen_banks
&[Arc<Bank>]
tower
&Tower
_progress
&ProgressMap
_ancestors
&HashMap<u64, HashSet<u64>>
bank_forks
&RwLock<BankForks>