async fn load_heaviest_tipset(&self) -> Result<(), Error> {
        let heaviest_ts = match self.db.read(HEAD_KEY)? {
            Some(bz) => self.tipset_from_keys(&from_slice(&bz)?).await?,
            None => {
                warn!("No previous chain state found");
                return Err(Error::Other("No chain state found".to_owned()));
            }
        };

        // set as heaviest tipset
        *self.heaviest.write().await = Some(heaviest_ts);
        Ok(())
    }
/// Loads heaviest tipset from datastore and sets as heaviest in chainstore
Loads heaviest tipset from datastore and sets as heaviest in chainstore
Loads heaviest tipset from datastore and sets as heaviest in chainstore
async fn load_heaviest_tipset(&self) -> Result<(), Error> {
        let heaviest_ts = match self.db.read(HEAD_KEY)? {
            Some(bz) => self.tipset_from_keys(&from_slice(&bz)?).await?,
            None => {
                warn!("No previous chain state found");
                return Err(Error::Other("No chain state found".to_owned()));
            }
        };
        // set as heaviest tipset
        *self.heaviest.write().await = Some(heaviest_ts);
        Ok(())
    }
async fn load_heaviest_tipset ( & self ) -> Result < ( ) , Error > { let heaviest_ts = match self . db . read ( HEAD_KEY ) ? { Some ( bz ) => self . tipset_from_keys ( & from_slice ( & bz ) ? ) . await ? , None => { warn ! ( " " ) ; return Err ( Error :: Other ( " " . to_owned ( ) ) ) ; } } ; // set as heaviest tipset * self . heaviest . write ( ) . await = Some ( heaviest_ts ) ; Ok ( ( ) ) }
Loads heaviest tipset from datastore and sets as heaviest in chainstore
Loads heaviest tipset from datastore and sets as heaviest in chainstore
&self