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:
1. Node0 generates some new blocks.
2. Node0 announces a new block1 requests & receives headers.
3. Node1 requests & receives headers0 runs `invalidateblock` on some blocks.
4. Node0 runs `invalidateblock` on some blocks1 requests the blocks corresponding to the full header list.
5. Node10 ignores requests theof invalid blocks corresponding to the full header list, per BlockRequestAllowed.
6. Node0 ignores requests of invalidre-validates those blocks, per BlockRequestAllowed and continues on.
7. Node0 re-validates those blocks and continues on.
8. 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)