Skip to content

Commit

Permalink
merge bitcoin#22618: Small follow-ups to 21528
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvg committed Apr 12, 2024
1 parent 18fe765 commit 8b8fbc5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions doc/release-notes-5978.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ RPC changes

- `getnodeaddresses` now also accepts a "network" argument (ipv4, ipv6, onion,
or i2p) to return only addresses of the specified network.

P2P and network changes
-----------------------

- A dashd node will no longer rumour addresses to inbound peers by default.
They will become eligible for address gossip after sending an ADDR, ADDRV2,
or GETADDR message.
4 changes: 3 additions & 1 deletion src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4397,7 +4397,9 @@ void PeerManagerImpl::ProcessMessage(
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.
Expand Down
2 changes: 1 addition & 1 deletion test/functional/p2p_addr_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def relay_tests(self):
# of the outbound peer which is 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 connection.
# Send an empty ADDR message to initialize address relay on this connection.
inbound_peer.send_and_ping(msg_addr())

self.log.info('Check that subsequent addr messages sent from an outbound peer are relayed')
Expand Down

0 comments on commit 8b8fbc5

Please sign in to comment.