skip peers using flux ports before adding to queue (#20)
This commit is contained in:
parent
309a0064b5
commit
c0b68332d5
|
@ -58,7 +58,10 @@ func (s *Seeder) onAddr(p *peer.Peer, msg *wire.MsgAddr) {
|
||||||
s.logger.Printf("Already knew about %s:%d", na.IP, na.Port)
|
s.logger.Printf("Already knew about %s:%d", na.IP, na.Port)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
s.addrQueue <- na
|
_, denied := DeniedPorts[na.Port]
|
||||||
|
if !denied {
|
||||||
|
s.addrQueue <- na
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +87,10 @@ func (s *Seeder) onAddrV2(p *peer.Peer, msg *wire.MsgAddrV2) {
|
||||||
s.logger.Printf("Already knew about %s:%d", na.IP, na.Port)
|
s.logger.Printf("Already knew about %s:%d", na.IP, na.Port)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
s.addrQueue <- &na.NetAddress
|
_, denied := DeniedPorts[na.Port]
|
||||||
|
if !denied {
|
||||||
|
s.addrQueue <- &na.NetAddress
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue