Skip to content

Commit ce67620

Browse files
author
MarcoFalke
committed
Merge #15897: QA/mininode: Send all headers upfront in send_blocks_and_test to avoid sending an unconnected one
9f9db39 QA/mininode: Send all headers upfront in send_blocks_and_test to avoid sending an unconnected one (Luke Dashjr) Pull request description: While this doesn't currently trigger any problems, the network protocol does expect headers to be sent connectable in normal circumstances, and if too many are sent out of order will disconnect the peer. ACKs for commit 9f9db3: Tree-SHA512: 25b88718e4ba3d31aed2de7ece23fab9a0737fd6536c5e618ea8eb5a3a217dab0dffaebc4892df7993bcea7efb7c4fb5085fabebe99535b8f7fdde3c19df54ff
2 parents 8da1aa4 + 9f9db39 commit ce67620

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/functional/test_framework/mininode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ def send_blocks_and_test(self, blocks, node, *, success=True, force_send=False,
531531
for b in blocks:
532532
self.send_message(msg_block(block=b))
533533
else:
534-
self.send_message(msg_headers([CBlockHeader(blocks[-1])]))
534+
self.send_message(msg_headers([CBlockHeader(block) for block in blocks]))
535535
wait_until(lambda: blocks[-1].sha256 in self.getdata_requests, timeout=timeout, lock=mininode_lock)
536536

537537
if expect_disconnect:

0 commit comments

Comments
 (0)