/// The method sends the given advert to the given list of peers.
The method sends the given advert to the given list of peers.
The method sends the given advert to the given list of peers .
fn send_advert_to_peer_list(&self, gossip_advert: GossipAdvert, peer_ids: Vec<NodeId>) {
        let message = GossipMessage::Advert(gossip_advert.clone());
        let flow_tag = self.flow_mapper.map(&message);
        for peer_id in peer_ids {
            self.transport_send(message.clone(), peer_id, flow_tag)
                .map(|_| self.metrics.adverts_sent.inc())
                .unwrap_or_else(|_e| {
                    // Ignore advert send failures
                    self.metrics.adverts_send_failed.inc();
                });
            trace!(
                self.log,
                "Node-{:?} sent gossip advert ->{:?} {:?}",
                self.node_id,
                peer_id,
                gossip_advert
            );
        }
    }
fn send_advert_to_peer_list ( & self , gossip_advert : GossipAdvert , peer_ids : Vec < NodeId > ) { let message = GossipMessage :: Advert ( gossip_advert . clone ( ) ) ; let flow_tag = self . flow_mapper . map ( & message ) ; for peer_id in peer_ids { self . transport_send ( message . clone ( ) , peer_id , flow_tag ) . map ( | _ | self . metrics . adverts_sent . inc ( ) ) . unwrap_or_else ( | _e | { // Ignore advert send failures self . metrics . adverts_send_failed . inc ( ) ; } ) ; trace ! ( self log " " self node_id peer_id gossip_advert ) ; } }
The method sends the given advert to the given list of peers.
The method sends the given advert to the given list of peers .
&self
gossip_advert
GossipAdvert
peer_ids
Vec<NodeId>