fn is_sync_candidate<T: BlockTree>(
        &self,
        peer: &PeerState,
        locators: &[BlockHash],
        tree: &T,
    ) -> bool {
        peer.link.is_outbound()
            && peer.height > tree.height()
            && !self.inflight.contains_key(&peer.id)
            && peer.last_asked.as_ref().map_or(true, |l| l.0 != locators)
    }
/// Check whether a peer can be synced with using the given locators.
Check whether a peer can be synced with using the given locators.
Check whether a peer can be synced with using the given locators .
fn is_sync_candidate<T: BlockTree>(
        &self,
        peer: &PeerState,
        locators: &[BlockHash],
        tree: &T,
    ) -> bool {
        peer.link.is_outbound()
            && peer.height > tree.height()
            && !self.inflight.contains_key(&peer.id)
            && peer.last_asked.as_ref().map_or(true, |l| l.0 != locators)
    }
fn is_sync_candidate < T : BlockTree > ( & self , peer : & PeerState , locators : & [ BlockHash ] , tree : & T , ) -> bool { peer . link . is_outbound ( ) && peer . height > tree . height ( ) && ! self . inflight . contains_key ( & peer . id ) && peer . last_asked . as_ref ( ) . map_or ( true , | l | l . 0 != locators ) }
Check whether a peer can be synced with using the given locators.
Check whether a peer can be synced with using the given locators .
&self
peer
&PeerState
locators
&[BlockHash]
tree
&T