fn recv_block(&mut self, query: Header, peer_id: PeerId, block: bool) {
        if block {
            self.get_query(query.parent.unwrap(), |_mgr, _parent, mut state| {
                state.providers.push(peer_id);
                Transition::Complete(Ok(()))
            });
        } else {
            self.recv_have(query, peer_id, block);
        }
    }
/// Processes the response of a block query.
///
/// Either completes the get query or processes it like a have query response.
Processes the response of a block query.
Either completes the get query or processes it like a have query response.
Processes the response of a block query . Either completes the get query or processes it like a have query response .
fn recv_block(&mut self, query: Header, peer_id: PeerId, block: bool) {
        if block {
            self.get_query(query.parent.unwrap(), |_mgr, _parent, mut state| {
                state.providers.push(peer_id);
                Transition::Complete(Ok(()))
            });
        } else {
            self.recv_have(query, peer_id, block);
        }
    }
fn recv_block ( & mut self , query : Header , peer_id : PeerId , block : bool ) { if block { self . get_query ( query . parent . unwrap ( ) , | _mgr , _parent , mut state | { state . providers . push ( peer_id ) ; Transition :: Complete ( Ok ( ( ) ) ) } ) ; } else { self . recv_have ( query , peer_id , block ) ; } }
Processes the response of a block query.
Processes the response of a block query .
&mut self
query
Header
peer_id
PeerId
block
bool
&mut self
query
Header
peer_id
PeerId
block
bool