Skip to content

Commit

Permalink
QA/mininode: Send all headers upfront in send_blocks_and_test to avoi…
Browse files Browse the repository at this point in the history
…d sending an unconnected one
  • Loading branch information
luke-jr committed Apr 25, 2019
1 parent 37f236a commit 9f9db39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/functional/test_framework/mininode.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def send_blocks_and_test(self, blocks, node, *, success=True, force_send=False,
for b in blocks:
self.send_message(msg_block(block=b))
else:
self.send_message(msg_headers([CBlockHeader(blocks[-1])]))
self.send_message(msg_headers([CBlockHeader(block) for block in blocks]))
wait_until(lambda: blocks[-1].sha256 in self.getdata_requests, timeout=timeout, lock=mininode_lock)

if expect_disconnect:
Expand Down

0 comments on commit 9f9db39

Please sign in to comment.