fn fetch_last_header(&self) -> Result<Option<BlockHeader>, ChainStorageError> {
        let header_count = lmdb_len(&self.env, &self.headers_db)?;
        if header_count >= 1 {
            let index = header_count as usize - 1;
            lmdb_get(&self.env, &self.headers_db, &index)
        } else {
            Ok(None)
        }
    }
/// 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 header_count = lmdb_len(&self.env, &self.headers_db)?;
        if header_count >= 1 {
            let index = header_count as usize - 1;
            lmdb_get(&self.env, &self.headers_db, &index)
        } else {
            Ok(None)
        }
    }
fn fetch_last_header ( & self ) -> Result < Option < BlockHeader > , ChainStorageError > { let header_count = lmdb_len ( & self . env , & self . headers_db ) ? ; if header_count >= 1 { let index = header_count as usize - 1 ; lmdb_get ( & self . env , & self . headers_db , & index ) } else { Ok ( None ) } }
Finds and returns the last stored header.
Finds and returns the last stored header .
&self
&self