diff --git a/doc/release-notes.md b/doc/release-notes.md --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -11,3 +11,6 @@ - The node will now limit the rate at which the addresses received via p2p messages are processed. This can be bypassed if needed by granting the `addr` permission to a peer(see the `-whitelist` option for details). + - A bitcoind node will no longer gossip addresses to inbound peers by default. + They will become eligible for address gossip after sending an ADDR, ADDRV2, + or GETADDR message. diff --git a/src/net_processing.cpp b/src/net_processing.cpp --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -5034,7 +5034,9 @@ return; } - SetupAddressRelay(pfrom, *peer); + // Since this must be an inbound connection, SetupAddressRelay will + // never fail. + Assume(SetupAddressRelay(pfrom, *peer)); // Only send one GetAddr response per connection to reduce resource // waste and discourage addr stamping of INV announcements. diff --git a/test/functional/p2p_addr_relay.py b/test/functional/p2p_addr_relay.py --- a/test/functional/p2p_addr_relay.py +++ b/test/functional/p2p_addr_relay.py @@ -194,7 +194,7 @@ # often sent before the GETADDR response. assert_equal(inbound_peer.num_ipv4_received, 0) - # Send an empty ADDR message to intialize address relay on this + # Send an empty ADDR message to initialize address relay on this # connection. inbound_peer.send_and_ping(msg_addr())