pub fn root_at_slot(&self, target_slot: Slot) -> Result<Option<Hash256>, Error> {
        process_results(self.rev_iter_block_roots()?, |mut iter| {
            iter.find(|(_, slot)| *slot == target_slot)
                .map(|(root, _)| root)
        })
    }
/// Returns the block canonical root of the current canonical chain at a given slot.
///
/// Returns `None` if the given slot doesn't exist in the chain.
Returns the block canonical root of the current canonical chain at a given slot.
Returns `None` if the given slot doesn't exist in the chain.
Returns the block canonical root of the current canonical chain at a given slot . Returns ` None ` if the given slot doesn ' t exist in the chain .
pub fn root_at_slot(&self, target_slot: Slot) -> Result<Option<Hash256>, Error> {
        process_results(self.rev_iter_block_roots()?, |mut iter| {
            iter.find(|(_, slot)| *slot == target_slot)
                .map(|(root, _)| root)
        })
    }
pub fn root_at_slot ( & self , target_slot : Slot ) -> Result < Option < Hash256 > , Error > { process_results ( self . rev_iter_block_roots ( ) ? , | mut iter | { iter . find ( | ( _ , slot ) | * slot == target_slot ) . map ( | ( root , _ ) | root ) } ) }
Returns the block canonical root of the current canonical chain at a given slot.
Returns the block canonical root of the current canonical chain at a given slot .
&self
target_slot
Slot