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:
parent
1c7487b8e4
commit
6bce973ac2
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue