Prune only if meshed (#362)

This commit is contained in:
petricadaipegsp 2024-11-19 23:51:42 +01:00 committed by GitHub
parent bc05a4d7b9
commit b94e123262
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -957,9 +957,12 @@ func (bs *BlossomSubRouter) handlePrune(p peer.ID, ctl *pb.ControlMessage) {
continue
}
log.Debugf("PRUNE: Remove mesh link to %s in %s", p, bitmask)
bs.tracer.Prune(p, bitmask)
delete(peers, p)
if _, inMesh := peers[p]; inMesh {
log.Debugf("PRUNE: Remove mesh link to %s in %s", p, bitmask)
bs.tracer.Prune(p, bitmask)
delete(peers, p)
}
// is there a backoff specified by the peer? if so obey it.
backoff := prune.GetBackoff()
if backoff > 0 {