/// The method is called when a new advert is received from the
/// peer with the given node ID.
///
/// Adverts for artifacts that have been downloaded before are
/// dropped.  If the artifact is not available locally, the advert
/// is added to this peer's advert list.
The method is called when a new advert is received from the
peer with the given node ID.

Adverts for artifacts that have been downloaded before are
dropped.  If the artifact is not available locally, the advert
is added to this peer's advert list.
The method is called when a new advert is received from the peer with the given node ID . Adverts for artifacts that have been downloaded before are dropped . If the artifact is not available locally the advert is added to this peer ' s advert list .
fn on_advert(&self, gossip_advert: GossipAdvert, peer_id: NodeId) {
        if self
            .artifact_manager
            .has_artifact(&gossip_advert.artifact_id)
        {
            return;
        }
        // The download manager handles the received advert.
        self.download_manager.on_advert(gossip_advert, peer_id);
        // The next download is triggered for the given peer ID.
        let _ = self.download_manager.download_next(peer_id);
    }
fn on_advert ( & self , gossip_advert : GossipAdvert , peer_id : NodeId ) { if self . artifact_manager . has_artifact ( & gossip_advert . artifact_id ) { return ; } // The download manager handles the received advert. self . download_manager . on_advert ( gossip_advert , peer_id ) ; // The next download is triggered for the given peer ID. let _ = self . download_manager . download_next ( peer_id ) ; }
The method is called when a new advert is received from the
peer with the given node ID.
The method is called when a new advert is received from the peer with the given node ID .
&self
gossip_advert
GossipAdvert
peer_id
NodeId