Skip to content

refactor: test: use wait_for_getdata() in p2p_compactblocks.py - #18756

Merged
maflcko merged 1 commit into
bitcoin:masterfrom
theStack:20200424-test-use-wait_for_getdata-in-p2p_compactblocks
Apr 24, 2020
Merged

maflcko merged 1 commit into
bitcoin:masterfrom
theStack:20200424-test-use-wait_for_getdata-in-p2p_compactblocks

Conversation

@theStack

Copy link
Copy Markdown
Contributor

The method wait_for_getdata() was recently changed to be more precise by waiting for a specified list of hashes, instead of only matching any getdata message (see Issue #18614 and PR #18690). This PR replaces the remaining occurences of manual inspection of last_messages with this call.

@fanquake fanquake added the Tests label Apr 24, 2020
@robot-visions

Copy link
Copy Markdown
Contributor

ACK c4027e7

Ran p2p_unrequested_blocks.py locally, still passes. Thanks for cleaning this up!

@maflcko
maflcko merged commit a215c61 into bitcoin:master Apr 24, 2020
@bitcoin bitcoin deleted a comment from alessandrocoxa Apr 26, 2020
assert_equal(test_node.last_message["getdata"].inv[0].hash, block.sha256)

# Send back a compactblock message that omits the coinbase
comp_block = HeaderAndShortIDs()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theStack
theStack deleted the 20200424-test-use-wait_for_getdata-in-p2p_compactblocks branch December 1, 2020 09:55
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 20, 2021
Summary:
> The method `wait_for_getdata()` was recently changed to be more precise by waiting for a specified list of hashes, instead of only matching any getdata message (see [[bitcoin/bitcoin#18690 | PR18690]]). This PR replaces the remaining occurences of manual inspection of last_messages with this call.

This is a backport of Core [[bitcoin/bitcoin#18756 | PR18756]]

Test Plan: test/functional/test_runner.py p2p_compactblocks

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8974
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants