diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-08-05 09:29:34 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-08-05 09:29:54 +0200 |
commit | dd981b5e840c0f1b29e8adaaea285230efd0aba6 (patch) | |
tree | 0923dde66d782bd4771503f31e1cbfa050ebfb41 | |
parent | e9472e6828ab862aa45f534f87d28a78ec7796d1 (diff) | |
parent | 9778b0fec13c047a4c7f3ae425d044da26eadc81 (diff) | |
download | bitcoin-dd981b5e840c0f1b29e8adaaea285230efd0aba6.tar.xz |
Merge bitcoin/bitcoin#22618: [p2p] Small follow-ups to 21528
9778b0fec13c047a4c7f3ae425d044da26eadc81 [net_processing] Provide debug error if code assumptions change. (Amiti Uttarwar)
aa79c912608fdc77c69dd43653aa87f1f34e01dd [docs] Add release notes for #21528 (Amiti Uttarwar)
Pull request description:
Adds a release note & addresses [this](https://github.com/bitcoin/bitcoin/pull/21528#discussion_r680963101) review comment to make expectations more explicit.
ACKs for top commit:
Zero-1729:
re-ACK 9778b0fec13c047a4c7f3ae425d044da26eadc81
jonatack:
ACK 9778b0fec13c047a4c7f3ae425d044da26eadc81
Tree-SHA512: 9507df5f2746d05c6df8c86b7a19364610ebfafc81af7650be7e68d7536a0685cce9fd2e5f287ef92b6245c584f8875b24a958109ba5bd8acf3c8fc9fd19eef2
-rw-r--r-- | doc/release-notes.md | 4 | ||||
-rw-r--r-- | src/net_processing.cpp | 4 | ||||
-rw-r--r-- | src/wallet/test/spend_tests.cpp | 2 | ||||
-rwxr-xr-x | test/functional/p2p_addr_relay.py | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/doc/release-notes.md b/doc/release-notes.md index f46e9e52c7..61c65d5a3e 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -57,6 +57,10 @@ Notable changes P2P and network changes ----------------------- +- A bitcoind 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. (#21528) + Updated RPCs ------------ diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 9da2fe5d6f..8243ef0f55 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -3749,7 +3749,9 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type, 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/src/wallet/test/spend_tests.cpp b/src/wallet/test/spend_tests.cpp index 66e7de4273..8821f680b3 100644 --- a/src/wallet/test/spend_tests.cpp +++ b/src/wallet/test/spend_tests.cpp @@ -54,7 +54,7 @@ BOOST_FIXTURE_TEST_CASE(SubtractFee, TestChain100Setup) // Send full input minus more than the fee amount to recipient, check // leftover input amount is paid to recipient not the miner (to_reduce == // -123). This overpays the recipient instead of overpaying the miner more - // than double the neccesary fee. + // than double the necessary fee. BOOST_CHECK_EQUAL(fee, check_tx(fee + 123)); } diff --git a/test/functional/p2p_addr_relay.py b/test/functional/p2p_addr_relay.py index 95743a1bf5..113e1f9492 100755 --- a/test/functional/p2p_addr_relay.py +++ b/test/functional/p2p_addr_relay.py @@ -179,7 +179,7 @@ class AddrTest(BitcoinTestFramework): # 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') |