fn is_best_child(&self, maybe_best_child: &SlotHashKey) -> bool {
        let maybe_best_child_weight = self.stake_voted_subtree(maybe_best_child).unwrap();
        let parent = self.parent(maybe_best_child);
        // If there's no parent, this must be the root
        if parent.is_none() {
            return true;
        }
        for child in self.children(&parent.unwrap()).unwrap() {
            let child_weight = self
                .stake_voted_subtree(child)
                .expect("child must exist in `self.fork_infos`");

            // Don't count children currently marked as invalid
            if !self.is_candidate(child).expect("child must exist in tree") {
                continue;
            }

            if child_weight > maybe_best_child_weight
                || (maybe_best_child_weight == child_weight && *child < *maybe_best_child)
            {
                return false;
            }
        }

        true
    }
// Returns if the given `maybe_best_child` is the heaviest among the children
// it's parent
Returns if the given `maybe_best_child` is the heaviest among the children
it's parent
Returns if the given ` maybe_best_child ` is the heaviest among the children it ' s parent
fn is_best_child(&self, maybe_best_child: &SlotHashKey) -> bool {
        let maybe_best_child_weight = self.stake_voted_subtree(maybe_best_child).unwrap();
        let parent = self.parent(maybe_best_child);
        // If there's no parent, this must be the root
        if parent.is_none() {
            return true;
        }
        for child in self.children(&parent.unwrap()).unwrap() {
            let child_weight = self
                .stake_voted_subtree(child)
                .expect("child must exist in `self.fork_infos`");
            // Don't count children currently marked as invalid
            if !self.is_candidate(child).expect("child must exist in tree") {
                continue;
            }
            if child_weight > maybe_best_child_weight
                || (maybe_best_child_weight == child_weight && *child < *maybe_best_child)
            {
                return false;
            }
        }
        true
    }
fn is_best_child ( & self , maybe_best_child : & SlotHashKey ) -> bool { let maybe_best_child_weight = self . stake_voted_subtree ( maybe_best_child ) . unwrap ( ) ; let parent = self . parent ( maybe_best_child ) ; // If there's no parent, this must be the root if parent . is_none ( ) { return true ; } for child in self . children ( & parent . unwrap ( ) ) . unwrap ( ) { let child_weight = self . stake_voted_subtree ( child ) . expect ( " " ) ; // Don't count children currently marked as invalid if ! self . is_candidate ( child ) . expect ( " " ) { continue ; } if child_weight > maybe_best_child_weight || ( maybe_best_child_weight == child_weight && * child < * maybe_best_child ) { return false ; } } true }
Returns if the given `maybe_best_child` is the heaviest among the children
it's parent
Returns if the given ` maybe_best_child ` is the heaviest among the children it ' s parent
&self
maybe_best_child
&SlotHashKey