/// The method sends the given chunk requests to the given peer.
The method sends the given chunk requests to the given peer.
The method sends the given chunk requests to the given peer .
fn send_chunk_requests(&self, requests: Vec<GossipChunkRequest>, peer_id: NodeId) {
        for request in requests {
            let message = GossipMessage::ChunkRequest(request);
            let flow_tag = self.flow_mapper.map(&message);
            // Debugging
            trace!(
                self.log,
                "Node-{:?} sending chunk request ->{:?} {:?}",
                self.node_id,
                peer_id,
                message
            );
            self.transport_send(message, peer_id, flow_tag)
                .map(|_| self.metrics.chunks_requested.inc())
                .unwrap_or_else(|_e| {
                    // Ingore chunk send failures. Points to a misbehaving peer
                    self.metrics.chunk_request_send_failed.inc();
                });
        }
    }
fn send_chunk_requests ( & self , requests : Vec < GossipChunkRequest > , peer_id : NodeId ) { for request in requests { let message = GossipMessage :: ChunkRequest ( request ) ; let flow_tag = self . flow_mapper . map ( & message ) ; // Debugging trace ! ( self log " " self node_id peer_id message ) ; self . transport_send ( message , peer_id , flow_tag ) . map ( | _ | self . metrics . chunks_requested . inc ( ) ) . unwrap_or_else ( | _e | { // Ingore chunk send failures. Points to a misbehaving peer self . metrics . chunk_request_send_failed . inc ( ) ; } ) ; } }
The method sends the given chunk requests to the given peer.
The method sends the given chunk requests to the given peer .
&self
requests
Vec<GossipChunkRequest>
peer_id
NodeId