fn delete_advert_from_peer(
        &self,
        peer_id: NodeId,
        artifact_id: &ArtifactId,
        integrity_hash: &CryptoHash,
        artifacts_under_construction: &mut dyn ArtifactDownloadList,
    ) {
        let ret = self.prioritizer.delete_advert_from_peer(
            artifact_id,
            integrity_hash,
            peer_id,
            AdvertTrackerFinalAction::Abort,
        );
        // Remove the artifact from the under-construction list if this peer was the
        // last peer with an advert tracker for this artifact, indicated by the
        // previous call's return value.
        if ret.is_ok() {
            artifacts_under_construction.remove_tracker(integrity_hash);
        }
    }
/// The method deletes the given advert from a particular peer.
///
/// If the deletion results in zero peers downloading the advert, then the
/// entry in the under-construction list is cleaned up as well.
The method deletes the given advert from a particular peer.
If the deletion results in zero peers downloading the advert, then the
entry in the under-construction list is cleaned up as well.
The method deletes the given advert from a particular peer . If the deletion results in zero peers downloading the advert then the entry in the under - construction list is cleaned up as well .
fn delete_advert_from_peer(
        &self,
        peer_id: NodeId,
        artifact_id: &ArtifactId,
        integrity_hash: &CryptoHash,
        artifacts_under_construction: &mut dyn ArtifactDownloadList,
    ) {
        let ret = self.prioritizer.delete_advert_from_peer(
            artifact_id,
            integrity_hash,
            peer_id,
            AdvertTrackerFinalAction::Abort,
        );
        // Remove the artifact from the under-construction list if this peer was the
        // last peer with an advert tracker for this artifact, indicated by the
        // previous call's return value.
        if ret.is_ok() {
            artifacts_under_construction.remove_tracker(integrity_hash);
        }
    }
fn delete_advert_from_peer ( & self , peer_id : NodeId , artifact_id : & ArtifactId , integrity_hash : & CryptoHash , artifacts_under_construction : & mut dyn ArtifactDownloadList , ) { let ret = self . prioritizer . delete_advert_from_peer ( artifact_id , integrity_hash , peer_id , AdvertTrackerFinalAction :: Abort , ) ; // Remove the artifact from the under-construction list if this peer was the // last peer with an advert tracker for this artifact, indicated by the // previous call's return value. if ret . is_ok ( ) { artifacts_under_construction . remove_tracker ( integrity_hash ) ; } }
The method deletes the given advert from a particular peer.
The method deletes the given advert from a particular peer .
&self
peer_id
NodeId
artifact_id
&ArtifactId
integrity_hash
&CryptoHash
artifacts_under_construction
&mut dyn ArtifactDownloadList
&self
peer_id
NodeId
artifact_id
&ArtifactId
integrity_hash
&CryptoHash
artifacts_under_construction
&mut dyn ArtifactDownloadList