pub fn received_block<T: BlockTree>(&mut self, from: &PeerId, block: Block, tree: &T) {
        let hash = block.block_hash();

        if let Some((height, _)) = tree.get_block(&hash) {
            self.upstream
                .event(Event::BlockReceived(*from, block, height));
        }
    }
/// Called when a block is received from a peer.
Called when a block is received from a peer.
Called when a block is received from a peer .
pub fn received_block<T: BlockTree>(&mut self, from: &PeerId, block: Block, tree: &T) {
        let hash = block.block_hash();
        if let Some((height, _)) = tree.get_block(&hash) {
            self.upstream
                .event(Event::BlockReceived(*from, block, height));
        }
    }
pub fn received_block < T : BlockTree > ( & mut self , from : & PeerId , block : Block , tree : & T ) { let hash = block . block_hash ( ) ; if let Some ( ( height , _ ) ) = tree . get_block ( & hash ) { self . upstream . event ( Event :: BlockReceived ( * from , block , height ) ) ; } }
Called when a block is received from a peer.
Called when a block is received from a peer .
&mut self
from
&PeerId
block
Block
tree
&T