mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2025-03-29 13:40:07 +08:00
fix add addrs bug
This commit is contained in:
parent
9868efd05f
commit
cdec762f40
@ -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(amap) == 0 {
|
|
||||||
delete(s.signedPeerRecords, p)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetAddr calls mgr.SetAddrs(p, addr, ttl)
|
// SetAddr calls mgr.SetAddrs(p, addr, ttl)
|
||||||
|
Loading…
Reference in New Issue
Block a user