pub fn descendants(&self) -> HashMap<u64, HashSet<u64>> {
        let mut descendants = HashMap::new();
        for bank in self.banks.values() {
            let _ = descendants.entry(bank.slot()).or_insert(HashSet::new());
            let mut set: HashSet<u64> = bank.ancestors.keys().cloned().collect();
            set.remove(&bank.slot());
            for parent in set {
                descendants
                    .entry(parent)
                    .or_insert(HashSet::new())
                    .insert(bank.slot());
            }
        }
        descendants
    }
/// Create a map of bank slot id to the set of all of its descendants
Create a map of bank slot id to the set of all of its descendants
Create a map of bank slot id to the set of all of its descendants
pub fn descendants(&self) -> HashMap<u64, HashSet<u64>> {
        let mut descendants = HashMap::new();
        for bank in self.banks.values() {
            let _ = descendants.entry(bank.slot()).or_insert(HashSet::new());
            let mut set: HashSet<u64> = bank.ancestors.keys().cloned().collect();
            set.remove(&bank.slot());
            for parent in set {
                descendants
                    .entry(parent)
                    .or_insert(HashSet::new())
                    .insert(bank.slot());
            }
        }
        descendants
    }
pub fn descendants ( & self ) -> HashMap < u64 , HashSet < u64 > > { let mut descendants = HashMap :: new ( ) ; for bank in self . banks . values ( ) { let _ = descendants . entry ( bank . slot ( ) ) . or_insert ( HashSet :: new ( ) ) ; let mut set : HashSet < u64 > = bank . ancestors . keys ( ) . cloned ( ) . collect ( ) ; set . remove ( & bank . slot ( ) ) ; for parent in set { descendants . entry ( parent ) . or_insert ( HashSet :: new ( ) ) . insert ( bank . slot ( ) ) ; } } descendants }
Create a map of bank slot id to the set of all of its descendants
Create a map of bank slot id to the set of all of its descendants
&self
&self