fix abc-parkedchain timeouts
Summary:
Lately on the Diff Testing we have seen random failures in this test.
By looking at logs we can see the following race condition was happening:
- Node0 generates some new blocks.
- Node1 requests & receives headers.
- Node0 runs invalidateblock on some blocks.
- Node1 requests the blocks corresponding to the full header list.
- Node0 ignores requests of invalid blocks, per BlockRequestAllowed.
- Node0 re-validates those blocks and continues on.
- Test proceeds up to wait_for_tip(). However, Node1 is still waiting for blocks that will never come. Timeout after 60 seconds.
This should break the race by requiring node1 to be synced before any rewind commands are done.
(thanks to @florian for noticing this in the logs)
Test Plan: very hard to test this rare failure; I can't seem to reproduce it locally.
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: jasonbcox, teamcity, florian, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2548