From 739d9b7c529c15e11e5528485f6a55b1ff8c15df Mon Sep 17 00:00:00 2001 From: Aarsh Shah Date: Wed, 1 Apr 2020 17:55:19 +0530 Subject: [PATCH] remove removal that is not required --- pstoremem/addr_book.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pstoremem/addr_book.go b/pstoremem/addr_book.go index 353b8a7..e165828 100644 --- a/pstoremem/addr_book.go +++ b/pstoremem/addr_book.go @@ -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