/// Iterate over all the stored block headers and execute the function `f` for each header.
Iterate over all the stored block headers and execute the function `f` for each header.
Iterate over all the stored block headers and execute the function ` f ` for each header .
fn for_each_header<F>(&self, mut f: F) -> Result<(), ChainStorageError>
    where F: FnMut(Result<(u64, BlockHeader), ChainStorageError>) {
        let db = self.db_access()?;
        for (key, val) in db.headers.iter() {
            f(Ok((*key, val.clone())));
        }
        Ok(())
    }
fn for_each_header < F > ( & self , mut f : F ) -> Result < ( ) , ChainStorageError > where F : FnMut ( Result < ( u64 , BlockHeader ) , ChainStorageError > ) { let db = self . db_access ( ) ? ; for ( key , val ) in db . headers . iter ( ) { f ( Ok ( ( * key , val . clone ( ) ) ) ) ; } Ok ( ( ) ) }
Iterate over all the stored block headers and execute the function `f` for each header.
Iterate over all the stored block headers and execute the function ` f ` for each header .
&self
f
F