Version of D18003 rebased on D18033.
Depends on D18033.
D17997 erroneously asserts ACCEPTED for all contenders which is obviously wrong. I mistakenly assumed the contenders test was being run on the diff but it turns out contenders just barely exceeds the cutoff timing.
This diff does a few things:
- After the node is restarted, but before a new block is mined, check staking rewards status and use that to verify avalanche status of contenders.
- Activate staking rewards predictably and invalidate contenders for each block. This ensures the vote statuses are predictable and we get the same results on CI and local dev.
- Skip the very end of the test for now. This part is still flaky and needs more investigation, but master has been red for too long. It is best if we make it green again and fixup the last part in a separate diff.