Merge pull request #133 from libp2p/feat/fix-addrs-bug

Fix memory store signed peer record bug
This commit is contained in:
Steven Allen 2020-03-29 19:27:18 -07:00 committed by GitHub
commit 1019086e7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,21 +240,6 @@ func (mab *memoryAddrBook) addAddrs(p peer.ID, addrs []ma.Multiaddr, ttl time.Du
}
}
}
// // when adding signed addrs, make sure only the addrs from the input list remain.
// if signed {
// for k := range amap {
// _, ok := addrSet[k]
// if !ok {
// delete(amap, k)
// }
// }
// }
// if we've expired all the signed addresses for a peer, remove their signed routing state record
if len(addrs) == 0 {
delete(s.signedPeerRecords, p)
}
}
// SetAddr calls mgr.SetAddrs(p, addr, ttl)