network: fix inverted logic of address addition to the pool

Fix #1066.
This commit is contained in:
Roman Khimov 2020-06-18 21:34:45 +03:00
parent 37164ee4ef
commit bbe174ee4a

View file

@ -648,7 +648,7 @@ func (s *Server) handleTxCmd(tx *transaction.Transaction) error {
func (s *Server) handleAddrCmd(p Peer, addrs *payload.AddressList) error {
for _, a := range addrs.Addrs {
addr, err := a.GetTCPAddress()
if err != nil {
if err == nil {
s.discovery.BackFill(addr)
}
}