mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-01-26 04:30:07 +08:00
remove removal that is not required
This commit is contained in:
parent
1907cca69f
commit
739d9b7c52
@ -295,11 +295,6 @@ func (mab *memoryAddrBook) SetAddrs(p peer.ID, addrs []ma.Multiaddr, ttl time.Du
|
||||
delete(amap, key)
|
||||
}
|
||||
}
|
||||
|
||||
// if we've expired all the signed addresses for a peer, remove their signed routing state record
|
||||
if len(amap) == 0 {
|
||||
delete(s.signedPeerRecords, p)
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateAddrs updates the addresses associated with the given peer that have
|
||||
@ -330,11 +325,6 @@ func (mab *memoryAddrBook) UpdateAddrs(p peer.ID, oldTTL time.Duration, newTTL t
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if we've expired all the signed addresses for a peer, remove their signed routing state record
|
||||
if len(amap) == 0 {
|
||||
delete(s.signedPeerRecords, p)
|
||||
}
|
||||
}
|
||||
|
||||
// Addrs returns all known (and valid) addresses for a given peer
|
||||
|
Loading…
Reference in New Issue
Block a user