Do not add inbound peers to the address manager.

This commit is contained in:
David Hill 2016-10-21 16:18:13 -04:00
parent b8df516b4b
commit bca9877796

View file

@ -353,15 +353,6 @@ func (sp *serverPeer) OnVersion(p *peer.Peer, msg *wire.MsgVersion) {
// Mark the address as a known good address.
addrManager.Good(p.NA())
} else {
// A peer might not be advertising the same address that it
// actually connected from. One example of why this can happen
// is with NAT. Only add the address to the address manager if
// the addresses agree.
if addrmgr.NetAddressKey(&msg.AddrMe) == addrmgr.NetAddressKey(p.NA()) {
addrManager.AddAddress(p.NA(), p.NA())
addrManager.Good(p.NA())
}
}
}