/// Finds and returns the last stored header.
Finds and returns the last stored header.
Finds and returns the last stored header .
fn fetch_last_header(&self) -> Result<Option<BlockHeader>, ChainStorageError> {
        let db = self.db_access()?;
        let header_count = db.headers.len() as u64;
        if header_count >= 1 {
            let k = header_count - 1;
            Ok(db.headers.get(&k).cloned())
        } else {
            Ok(None)
        }
    }
fn fetch_last_header ( & self ) -> Result < Option < BlockHeader > , ChainStorageError > { let db = self . db_access ( ) ? ; let header_count = db . headers . len ( ) as u64 ; if header_count >= 1 { let k = header_count - 1 ; Ok ( db . headers . get ( & k ) . cloned ( ) ) } else { Ok ( None ) } }
Finds and returns the last stored header.
Finds and returns the last stored header .
&self