network: drop duplicationg check from handleAddrCmd()

It was relevant with the queue-based discoverer, now it's not, discoverer
handles this internally.
This commit is contained in:
Roman Khimov 2022-11-17 17:42:36 +03:00
parent 1c7487b8e4
commit 6bce973ac2

View file

@ -1196,11 +1196,9 @@ func (s *Server) handleAddrCmd(p Peer, addrs *payload.AddressList) error {
if !p.CanProcessAddr() {
return errors.New("unexpected addr received")
}
dups := make(map[string]bool)
for _, a := range addrs.Addrs {
addr, err := a.GetTCPAddress()
if err == nil && !dups[addr] {
dups[addr] = true
if err == nil {
s.discovery.BackFill(addr)
}
}