fn send_chunk_to_peer(&self, gossip_chunk: GossipChunk, peer_id: NodeId) {
        trace!(
            self.log,
            "Node-{:?} sent chunk data  ->{:?} {:?}",
            self.node_id,
            peer_id,
            gossip_chunk
        );
        let message = GossipMessage::Chunk(gossip_chunk);
        let flow_tag = self.flow_mapper.map(&message);
        self.transport_send(message, peer_id, flow_tag)
            .map(|_| self.metrics.chunks_sent.inc())
            .unwrap_or_else(|e| {
                // Transport and gossip implement fixed-sized queues for flow control.
                // Logging is performed at a lower level to avoid being spammed by misbehaving
                // nodes. Errors are ignored as protocol violations.
                trace!(self.log, "Send chunk failed: peer {:?} {:?} ", peer_id, e);
                self.metrics.chunk_send_failed.inc();
            });
    }
/// The method sends a chunk to the peer with the given node ID.
The method sends a chunk to the peer with the given node ID.
The method sends a chunk to the peer with the given node ID .
fn send_chunk_to_peer(&self, gossip_chunk: GossipChunk, peer_id: NodeId) {
        trace!(
            self.log,
            "Node-{:?} sent chunk data  ->{:?} {:?}",
            self.node_id,
            peer_id,
            gossip_chunk
        );
        let message = GossipMessage::Chunk(gossip_chunk);
        let flow_tag = self.flow_mapper.map(&message);
        self.transport_send(message, peer_id, flow_tag)
            .map(|_| self.metrics.chunks_sent.inc())
            .unwrap_or_else(|e| {
                // Transport and gossip implement fixed-sized queues for flow control.
                // Logging is performed at a lower level to avoid being spammed by misbehaving
                // nodes. Errors are ignored as protocol violations.
                trace!(self.log, "Send chunk failed: peer {:?} {:?} ", peer_id, e);
                self.metrics.chunk_send_failed.inc();
            });
    }
fn send_chunk_to_peer ( & self , gossip_chunk : GossipChunk , peer_id : NodeId ) { trace ! ( self log " " self node_id peer_id gossip_chunk ) ; let message = GossipMessage :: Chunk ( gossip_chunk ) ; let flow_tag = self . flow_mapper . map ( & message ) ; self . transport_send ( message , peer_id , flow_tag ) . map ( | _ | self . metrics . chunks_sent . inc ( ) ) . unwrap_or_else ( | e | { // Transport and gossip implement fixed-sized queues for flow control. // Logging is performed at a lower level to avoid being spammed by misbehaving // nodes. Errors are ignored as protocol violations. trace ! ( self log " " peer_id e ) ; self . metrics . chunk_send_failed . inc ( ) ; } ) ; }
The method sends a chunk to the peer with the given node ID.
The method sends a chunk to the peer with the given node ID .
&self
gossip_chunk
GossipChunk
peer_id
NodeId
&self
gossip_chunk
GossipChunk
peer_id
NodeId