// Fetches the stored index offset of the first stored element in the db. When the index offset cannot be retrieved
// then a zero offset is recorded.
Fetches the stored index offset of the first stored element in the db. When the index offset cannot be retrieved
then a zero offset is recorded.
Fetches the stored index offset of the first stored element in the db . When the index offset cannot be retrieved then a zero offset is recorded .
fn fetch_index_offset(&self) -> Result<i64, ChainStorageError> {
        Ok(
            match lmdb_get::<i64, i64>(&self.env, &self.db, &INDEX_OFFSET_DB_KEY)
                .map_err(|e| ChainStorageError::AccessError(e.to_string()))?
            {
                Some(offset) => offset,
                None => {
                    let offset = 0;
                    self.set_index_offset(offset)?;
                    offset
                },
            },
        )
    }
fn fetch_index_offset ( & self ) -> Result < i64 , ChainStorageError > { Ok ( match lmdb_get :: < i64 , i64 > ( & self . env , & self . db , & INDEX_OFFSET_DB_KEY ) . map_err ( | e | ChainStorageError :: AccessError ( e . to_string ( ) ) ) ? { Some ( offset ) => offset , None => { let offset = 0 ; self . set_index_offset ( offset ) ? ; offset } , } , ) }
Fetches the stored index offset of the first stored element in the db.
Fetches the stored index offset of the first stored element in the db .
&self