Skip to content

Conversation

@ryanofsky
Copy link
Contributor

@ryanofsky ryanofsky commented Nov 11, 2016

This PR changes the sync_blocks test function to make it more reliable.

The change is based on #9196 to prevent a test failure that would otherwise start to happen.

ryanofsky and others added 2 commits October 25, 2016 15:30
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]>.
@fanquake fanquake added the Tests label Nov 12, 2016
@ryanofsky ryanofsky changed the title Change sync_blocks to pick smarter maxheight Change sync_blocks to pick smarter maxheight (on top of #9136) Nov 14, 2016
@ryanofsky ryanofsky changed the title Change sync_blocks to pick smarter maxheight (on top of #9136) Change sync_blocks to pick smarter maxheight Nov 14, 2016
@ryanofsky
Copy link
Contributor Author

Rearranged if-conditions as suggested offline by @morcos.

Copy link
Member

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?

Copy link
Contributor Author

@ryanofsky ryanofsky Nov 15, 2016

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.

@maflcko
Copy link
Member

maflcko commented Nov 15, 2016

Concept ACK

@morcos
Copy link
Contributor

morcos commented Nov 15, 2016

ACK

@maflcko
Copy link
Member

maflcko commented Nov 19, 2016

@ryanofsky The 60cf51c patch looks like a separate bugfix, not strictly related to tests. Would you mind submitting this as another pull request?

@ryanofsky ryanofsky changed the title Change sync_blocks to pick smarter maxheight Change sync_blocks to pick smarter maxheight (on top of #9196) Nov 21, 2016
@maflcko maflcko closed this Nov 23, 2016
@maflcko maflcko reopened this Nov 23, 2016
@maflcko maflcko merged commit 1126c85 into bitcoin:master Nov 23, 2016
maflcko pushed a commit that referenced this pull request Nov 23, 2016
…9196)

1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
codablock pushed a commit to codablock/dash that referenced this pull request Jan 17, 2018
…top of bitcoin#9196)

1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
…top of bitcoin#9196)

1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 25, 2019
…top of bitcoin#9196)

1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants