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

QA/mininode: Send all headers upfront in send_blocks_and_test to avoid sending an unconnected one #15897

Merged
merged 1 commit into from Apr 29, 2019

Conversation

Projects
None yet
3 participants
@luke-jr
Copy link
Member

commented Apr 25, 2019

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.

@DrahtBot DrahtBot added the Tests label Apr 25, 2019

@@ -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]))

This comment has been minimized.

Copy link
@MarcoFalke

MarcoFalke Apr 26, 2019

Member

I think we want to send only the latest header and wait for the other side to ask for all on its own.

This comment has been minimized.

Copy link
@luke-jr

luke-jr Apr 26, 2019

Author Member

That's currently considered a network protocol error...?

This comment has been minimized.

Copy link
@MarcoFalke

MarcoFalke Apr 29, 2019

Member

Eh, yeah

@MarcoFalke MarcoFalke merged commit 9f9db39 into bitcoin:master Apr 29, 2019

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

MarcoFalke added a commit that referenced this pull request Apr 29, 2019

Merge #15897: QA/mininode: Send all headers upfront in send_blocks_an…
…d_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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.