pub fn rev_iter_state_roots(
        &self,
    ) -> Result<impl Iterator<Item = Result<(Hash256, Slot), Error>>, Error> {
        let head = self.head()?;
        let head_slot = head.beacon_state.slot;
        let head_state_root = head.beacon_state_root();
        let iter = StateRootsIterator::owned(self.store.clone(), head.beacon_state);
        let iter = std::iter::once(Ok((head_state_root, head_slot)))
            .chain(iter)
            .map(|result| result.map_err(Into::into));
        Ok(iter)
    }
/// Iterates across all `(state_root, slot)` pairs from the head of the chain (inclusive) to
/// the earliest reachable ancestor (may or may not be genesis).
///
/// ## Notes
///
/// `slot` always decreases by `1`.
/// - Iterator returns `(Hash256, Slot)`.
/// - As this iterator starts at the `head` of the chain (viz., the best block), the first slot
///     returned may be earlier than the wall-clock slot.
Iterates across all `(state_root, slot)` pairs from the head of the chain (inclusive) to
the earliest reachable ancestor (may or may not be genesis).
Iterates across all ` ( state_root slot ) ` pairs from the head of the chain ( inclusive ) to the earliest reachable ancestor ( may or may not be genesis ) .
pub fn rev_iter_state_roots(
        &self,
    ) -> Result<impl Iterator<Item = Result<(Hash256, Slot), Error>>, Error> {
        let head = self.head()?;
        let head_slot = head.beacon_state.slot;
        let head_state_root = head.beacon_state_root();
        let iter = StateRootsIterator::owned(self.store.clone(), head.beacon_state);
        let iter = std::iter::once(Ok((head_state_root, head_slot)))
            .chain(iter)
            .map(|result| result.map_err(Into::into));
        Ok(iter)
    }
pub fn rev_iter_state_roots ( & self , ) -> Result < impl Iterator < Item = Result < ( Hash256 , Slot ) , Error > > , Error > { let head = self . head ( ) ? ; let head_slot = head . beacon_state . slot ; let head_state_root = head . beacon_state_root ( ) ; let iter = StateRootsIterator :: owned ( self . store . clone ( ) , head . beacon_state ) ; let iter = std :: iter :: once ( Ok ( ( head_state_root , head_slot ) ) ) . chain ( iter ) . map ( | result | result . map_err ( Into :: into ) ) ; Ok ( iter ) }
Iterates across all `(state_root, slot)` pairs from the head of the chain (inclusive) to
the earliest reachable ancestor (may or may not be genesis).
Iterates across all ` ( state_root slot ) ` pairs from the head of the chain ( inclusive ) to the earliest reachable ancestor ( may or may not be genesis ) .
&self
notes
`slot` always decreases by `1`.
Iterator returns `(Hash256, Slot)`.
As this iterator starts at the `head` of the chain (viz., the best block), the first slot
returned may be earlier than the wall-clock slot.
` slot ` always decreases by ` 1 ` . Iterator returns ` ( Hash256 Slot ) ` . As this iterator starts at the ` head ` of the chain ( viz . the best block ) the first slot returned may be earlier than the wall - clock slot .