This PR adds test coverage for: https://github.com/bitcoin/bitcoin/blob/71b63195b30b2fa0dff20ebb262ce7566dd5d673/src/net_processing.cpp#L3796-L3807
test: check disconnection when sending sendaddrv2 after verack #29699
pull brunoerg wants to merge 1 commits into bitcoin:master from brunoerg:2024-03-test-sendaddrv2-after-verack changing 1 files +9 −2-
brunoerg commented at 8:56 PM on March 21, 2024: contributor
-
DrahtBot commented at 8:56 PM on March 21, 2024: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK byaye, maflcko Stale ACK BrandonOdiwuor, kevkevinpal If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
No conflicts as of last run.
- DrahtBot added the label Tests on Mar 21, 2024
-
maflcko commented at 7:10 AM on March 22, 2024: member
lgtm ACK 8517ee951321e54443c40303791a0e154c2bb81f
- BrandonOdiwuor approved
-
BrandonOdiwuor commented at 12:31 PM on March 25, 2024: contributor
crACK 8517ee951321e54443c40303791a0e154c2bb81f
-
kevkevinpal commented at 12:55 PM on March 27, 2024: contributor
ACK 8517ee9
-
in test/functional/p2p_addrv2_relay.py:106 in 8517ee9513 outdated
99 | @@ -99,6 +100,11 @@ def run_test(self): 100 | assert addr_receiver.addrv2_received_and_checked 101 | assert_equal(len(self.nodes[0].getnodeaddresses(count=0, network="i2p")), 0) 102 | 103 | + self.log.info('Check disconnection when sending sendaddrv2 after verack') 104 | + with self.nodes[0].assert_debug_log(['sendaddrv2 received after verack from peer=0; disconnecting']): 105 | + addr_source.send_message(msg_sendaddrv2()) 106 | + addr_source.wait_for_disconnect()
brunoerg commented at 10:04 AM on March 28, 2024:Yes, I think I can move it to
p2p_leak, for example.
maflcko commented at 10:06 AM on March 28, 2024:You can keep it in the same file. Above
self.log.info('Create connection that sends addrv2 messages')should be enough to solve the conflict.
brunoerg commented at 10:22 AM on March 28, 2024:You're right, will address it.
brunoerg commented at 10:27 AM on March 28, 2024:Done
brunoerg force-pushed on Mar 28, 2024test: check disconnection when sending sendaddrv2 after verack b4c9ace6ffbrunoerg force-pushed on Mar 28, 2024brunoerg commented at 10:27 AM on March 28, 2024: contributorForce-pushed addressing #29699 (review)
byaye approvedbyaye commented at 12:10 PM on April 15, 2024: noneTested ACK b4c9ace6ff36c54755e4b12f204212c1b938f509
<img width="854" alt="Screenshot 2024-04-15 at 09 03 30" src="https://github.com/bitcoin/bitcoin/assets/19962379/4bc020e1-ecfb-4ac2-88b0-b3cd03cf9a00">
DrahtBot requested review from maflcko on Apr 15, 2024DrahtBot requested review from BrandonOdiwuor on Apr 15, 2024maflcko commented at 12:13 PM on April 15, 2024: memberlgtm ACK b4c9ace6ff36c54755e4b12f204212c1b938f509
in test/functional/p2p_addrv2_relay.py:100 in b4c9ace6ff
95 | @@ -89,8 +96,8 @@ def run_test(self): 96 | msg.addrs = ADDRS 97 | msg_size = calc_addrv2_msg_size(ADDRS) 98 | with self.nodes[0].assert_debug_log([ 99 | - f'received: addrv2 ({msg_size} bytes) peer=0', 100 | - f'sending addrv2 ({msg_size} bytes) peer=1', 101 | + f'received: addrv2 ({msg_size} bytes) peer=1', 102 | + f'sending addrv2 ({msg_size} bytes) peer=2',
glozow commented at 2:03 PM on April 15, 2024:(I think this is a good example of why we shouldn't use
assert_debug_logwhen we're able to check the logic otherwise)
brunoerg commented at 4:02 PM on April 15, 2024:Yes :)
glozow commented at 2:03 PM on April 15, 2024: memberLGTM
glozow merged this on Apr 15, 2024glozow closed this on Apr 15, 2024bitcoin locked this on Apr 15, 2025
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 03:13 UTC
More mirrored repositories can be found on mirror.b10c.me