fn broadcast_tip<T: BlockTree>(&mut self, hash: &BlockHash, tree: &T) {
        if let Some((height, best)) = tree.get_block(hash) {
            for (addr, peer) in &self.peers {
                // TODO: Don't broadcast to peer that is currently syncing?
                if peer.link == Link::Inbound && height > peer.height {
                    self.upstream.send_headers(*addr, vec![*best]);
                }
            }
        }
    }
/// Broadcast our best block header to connected peers who don't have it.
Broadcast our best block header to connected peers who don't have it.
Broadcast our best block header to connected peers who don ' t have it .
fn broadcast_tip<T: BlockTree>(&mut self, hash: &BlockHash, tree: &T) {
        if let Some((height, best)) = tree.get_block(hash) {
            for (addr, peer) in &self.peers {
                // TODO: Don't broadcast to peer that is currently syncing?
                if peer.link == Link::Inbound && height > peer.height {
                    self.upstream.send_headers(*addr, vec![*best]);
                }
            }
        }
    }
fn broadcast_tip < T : BlockTree > ( & mut self , hash : & BlockHash , tree : & T ) { if let Some ( ( height , best ) ) = tree . get_block ( hash ) { for ( addr , peer ) in & self . peers { // TODO: Don't broadcast to peer that is currently syncing? if peer . link == Link :: Inbound && height > peer . height { self . upstream . send_headers ( * addr , vec ! [ best ] ) ; } } } }
Broadcast our best block header to connected peers who don't have it.
Broadcast our best block header to connected peers who don ' t have it .
&mut self
hash
&BlockHash
tree
&T