Skip to content

Commit dd981b5

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#22618: [p2p] Small follow-ups to 21528
9778b0f [net_processing] Provide debug error if code assumptions change. (Amiti Uttarwar) aa79c91 [docs] Add release notes for #21528 (Amiti Uttarwar) Pull request description: Adds a release note & addresses [this](bitcoin/bitcoin#21528 (comment)) review comment to make expectations more explicit. ACKs for top commit: Zero-1729: re-ACK 9778b0f jonatack: ACK 9778b0f Tree-SHA512: 9507df5f2746d05c6df8c86b7a19364610ebfafc81af7650be7e68d7536a0685cce9fd2e5f287ef92b6245c584f8875b24a958109ba5bd8acf3c8fc9fd19eef2
2 parents e9472e6 + 9778b0f commit dd981b5

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

doc/release-notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ Notable changes
5757
P2P and network changes
5858
-----------------------
5959

60+
- A bitcoind node will no longer rumour addresses to inbound peers by default.
61+
They will become eligible for address gossip after sending an ADDR, ADDRV2,
62+
or GETADDR message. (#21528)
63+
6064
Updated RPCs
6165
------------
6266

src/net_processing.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3749,7 +3749,9 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
37493749
return;
37503750
}
37513751

3752-
SetupAddressRelay(pfrom, *peer);
3752+
// Since this must be an inbound connection, SetupAddressRelay will
3753+
// never fail.
3754+
Assume(SetupAddressRelay(pfrom, *peer));
37533755

37543756
// Only send one GetAddr response per connection to reduce resource waste
37553757
// and discourage addr stamping of INV announcements.

src/wallet/test/spend_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ BOOST_FIXTURE_TEST_CASE(SubtractFee, TestChain100Setup)
5454
// Send full input minus more than the fee amount to recipient, check
5555
// leftover input amount is paid to recipient not the miner (to_reduce ==
5656
// -123). This overpays the recipient instead of overpaying the miner more
57-
// than double the neccesary fee.
57+
// than double the necessary fee.
5858
BOOST_CHECK_EQUAL(fee, check_tx(fee + 123));
5959
}
6060

test/functional/p2p_addr_relay.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def relay_tests(self):
179179
# of the outbound peer which is often sent before the GETADDR response.
180180
assert_equal(inbound_peer.num_ipv4_received, 0)
181181

182-
# Send an empty ADDR message to intialize address relay on this connection.
182+
# Send an empty ADDR message to initialize address relay on this connection.
183183
inbound_peer.send_and_ping(msg_addr())
184184

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

0 commit comments

Comments
 (0)