fn update_ancestor_stakes(
        stake_lockouts: &mut HashMap<u64, StakeLockout>,
        slot: u64,
        difs: u64,
        ancestors: &HashMap<u64, HashSet<u64>>,
    ) {
        let mut slot_with_ancestors = vec![slot];
        slot_with_ancestors.extend(ancestors.get(&slot).unwrap_or(&HashSet::new()));
        for slot in slot_with_ancestors {
            let entry = &mut stake_lockouts.entry(slot).or_default();
            entry.stake += difs;
        }
    }
/// Update stake for all the ancestors.
/// Note, stake is the same for all the ancestor.
Update stake for all the ancestors.
Note, stake is the same for all the ancestor.
Update stake for all the ancestors . Note stake is the same for all the ancestor .
fn update_ancestor_stakes(
        stake_lockouts: &mut HashMap<u64, StakeLockout>,
        slot: u64,
        difs: u64,
        ancestors: &HashMap<u64, HashSet<u64>>,
    ) {
        let mut slot_with_ancestors = vec![slot];
        slot_with_ancestors.extend(ancestors.get(&slot).unwrap_or(&HashSet::new()));
        for slot in slot_with_ancestors {
            let entry = &mut stake_lockouts.entry(slot).or_default();
            entry.stake += difs;
        }
    }
fn update_ancestor_stakes ( stake_lockouts : & mut HashMap < u64 , StakeLockout > , slot : u64 , difs : u64 , ancestors : & HashMap < u64 , HashSet < u64 > > , ) { let mut slot_with_ancestors = vec ! [ slot ] ; slot_with_ancestors . extend ( ancestors . get ( & slot ) . unwrap_or ( & HashSet :: new ( ) ) ) ; for slot in slot_with_ancestors { let entry = & mut stake_lockouts . entry ( slot ) . or_default ( ) ; entry . stake += difs ; } }
Update stake for all the ancestors.
Update stake for all the ancestors .
stake_lockouts
&mut HashMap<u64, StakeLockout>
slot
u64
difs
u64
ancestors
&HashMap<u64, HashSet<u64>>
stake_lockouts
&mut HashMap<u64, StakeLockout>
slot
u64
difs
u64
ancestors
&HashMap<u64, HashSet<u64>>