-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Change sync_blocks to pick smarter maxheight (on top of #9196) #9139
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
Conversation
This change is needed to prevent sync_blocks timeouts in the mempool_reorg test after the sync_blocks update in the upcoming commit "[qa] Change sync_blocks to pick smarter maxheight". This change was initially suggested by Suhas Daftuar <[email protected]> in bitcoin#8680 (comment)
Instead of syncing to max height returned by the waitforblockheight RPC, sync to the max height returned by the getblockcount RPC. This change was suggested by Suhas Daftuar <[email protected]>.
51937a4 to
d0e07e6
Compare
d0e07e6 to
863b6e7
Compare
863b6e7 to
b0e57bd
Compare
|
Rearranged if-conditions as suggested offline by @morcos. |
qa/rpc-tests/test_framework/util.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this comment still apply, considering that you switched from 0 to getblockcount?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change might make the problem less likely to happen, but it still could happen. If none of the nodes in the set are fully synced when the sync_blocks call is made, then maxheight will be set to some height less than the final stable height, and the call could return before the nodes are all synced.
|
Concept ACK |
|
ACK |
|
@ryanofsky The 60cf51c patch looks like a separate bugfix, not strictly related to tests. Would you mind submitting this as another pull request? |
b0e57bd to
1126c85
Compare
…top of bitcoin#9196) 1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
…top of bitcoin#9196) 1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
…top of bitcoin#9196) 1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
This PR changes the
sync_blockstest function to make it more reliable.The change is based on #9196 to prevent a test failure that would otherwise start to happen.