From 6bce973ac2ccaff851b869b4fa8997351291a0de Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 17 Nov 2022 17:42:36 +0300 Subject: [PATCH] network: drop duplicationg check from handleAddrCmd() It was relevant with the queue-based discoverer, now it's not, discoverer handles this internally. --- pkg/network/server.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/network/server.go b/pkg/network/server.go index b3ce79bca..4a8512e11 100644 --- a/pkg/network/server.go +++ b/pkg/network/server.go @@ -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) } }