Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix StopIteration exception in p2p_node_network_limited.py #29753

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/functional/p2p_node_network_limited.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def test_avoid_requesting_historical_blocks(self):

# Wait until the full_node is headers-wise sync
best_block_hash = pruned_node.getbestblockhash()
self.wait_until(lambda: next(filter(lambda x: x['hash'] == best_block_hash, full_node.getchaintips()))['status'] == "headers-only")
default_value = {'status': ''} # No status
self.wait_until(lambda: next(filter(lambda x: x['hash'] == best_block_hash, full_node.getchaintips()), default_value)['status'] == "headers-only")

# Now, since the node aims to download a window of 1024 blocks,
# ensure it requests the blocks below the threshold only (with a
Expand Down