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() { if !p.CanProcessAddr() {
return errors.New("unexpected addr received") return errors.New("unexpected addr received")
} }
dups := make(map[string]bool)
for _, a := range addrs.Addrs { for _, a := range addrs.Addrs {
addr, err := a.GetTCPAddress() addr, err := a.GetTCPAddress()
if err == nil && !dups[addr] { if err == nil {
dups[addr] = true
s.discovery.BackFill(addr) s.discovery.BackFill(addr)
} }
} }