async fn request_genesis(&mut self) -> Result<(), Report> {
        // Due to Bitcoin protocol limitations, we can't request the genesis
        // block using our standard tip-following algorithm:
        //  - getblocks requires at least one hash
        //  - responses start with the block *after* the requested block, and
        //  - the genesis hash is used as a placeholder for "no matches".
        //
        // So we just download and verify the genesis block here.
        while !self.state_contains(self.genesis_hash).await? {
            tracing::info!("starting genesis block download and verify");
            self.downloads
                .download_and_verify(self.genesis_hash)
                .await
                .map_err(|e| eyre!(e))?;
            match self.downloads.next().await.expect("downloads is nonempty") {
                Ok(hash) => tracing::trace!(?hash, "verified and committed block to state"),
                Err(e) => {
                    tracing::warn!(?e, "could not download or verify genesis block, retrying");
                    tokio::time::sleep(GENESIS_TIMEOUT_RETRY).await;
                }
            }
        }

        Ok(())
    }
/// Download and verify the genesis block, if it isn't currently known to
/// our node.
Download and verify the genesis block, if it isn't currently known to
our node.
Download and verify the genesis block if it isn ' t currently known to our node .
async fn request_genesis(&mut self) -> Result<(), Report> {
        // Due to Bitcoin protocol limitations, we can't request the genesis
        // block using our standard tip-following algorithm:
        //  - getblocks requires at least one hash
        //  - responses start with the block *after* the requested block, and
        //  - the genesis hash is used as a placeholder for "no matches".
        //
        // So we just download and verify the genesis block here.
        while !self.state_contains(self.genesis_hash).await? {
            tracing::info!("starting genesis block download and verify");
            self.downloads
                .download_and_verify(self.genesis_hash)
                .await
                .map_err(|e| eyre!(e))?;
            match self.downloads.next().await.expect("downloads is nonempty") {
                Ok(hash) => tracing::trace!(?hash, "verified and committed block to state"),
                Err(e) => {
                    tracing::warn!(?e, "could not download or verify genesis block, retrying");
                    tokio::time::sleep(GENESIS_TIMEOUT_RETRY).await;
                }
            }
        }
        Ok(())
    }
async fn request_genesis ( & mut self ) -> Result < ( ) , Report > { // Due to Bitcoin protocol limitations, we can't request the genesis // block using our standard tip-following algorithm: //  - getblocks requires at least one hash //  - responses start with the block *after* the requested block, and //  - the genesis hash is used as a placeholder for "no matches". // // So we just download and verify the genesis block here. while ! self . state_contains ( self . genesis_hash ) . await ? { tracing :: info ! ( " " ) ; self . downloads . download_and_verify ( self . genesis_hash ) . await . map_err ( | e | eyre ! ( e ) ) ? ; match self . downloads . next ( ) . await . expect ( " " ) { Ok ( hash ) => tracing :: trace ! ( hash " " ) , Err ( e ) => { tracing :: warn ! ( e " " ) ; tokio :: time :: sleep ( GENESIS_TIMEOUT_RETRY ) . await ; } } } Ok ( ( ) ) }
Download and verify the genesis block, if it isn't currently known to
our node.
Download and verify the genesis block if it isn ' t currently known to our node .
&mut self