pub fn best_block(&self, hash_or_height: HashOrHeight) -> Option<Arc<Block>> {
        let best_chain = self.best_chain()?;
        let height =
            hash_or_height.height_or_else(|hash| best_chain.height_by_hash.get(&hash).cloned())?;

        best_chain
            .blocks
            .get(&height)
            .map(|prepared| prepared.block.clone())
    }
/// Returns the `block` at a given height or hash in the best chain.
Returns the `block` at a given height or hash in the best chain.
Returns the ` block ` at a given height or hash in the best chain .
pub fn best_block(&self, hash_or_height: HashOrHeight) -> Option<Arc<Block>> {
        let best_chain = self.best_chain()?;
        let height =
            hash_or_height.height_or_else(|hash| best_chain.height_by_hash.get(&hash).cloned())?;
        best_chain
            .blocks
            .get(&height)
            .map(|prepared| prepared.block.clone())
    }
pub fn best_block ( & self , hash_or_height : HashOrHeight ) -> Option < Arc < Block > > { let best_chain = self . best_chain ( ) ? ; let height = hash_or_height . height_or_else ( | hash | best_chain . height_by_hash . get ( & hash ) . cloned ( ) ) ? ; best_chain . blocks . get ( & height ) . map ( | prepared | prepared . block . clone ( ) ) }
Returns the `block` at a given height or hash in the best chain.
Returns the ` block ` at a given height or hash in the best chain .
&self
hash_or_height
HashOrHeight