test: check BlockStatus when InvalidateBlock is used
Summary:
when a block is invalidated using InvalidateBlock, check that:
- it's status is BLOCK_FAILED_VALID
- it's children's status is BLOCK_FAILED_CHILD and not BLOCK_FAILED_VALID
- it's ancestors are valid
This is a partial backport of core#31835
https://github.com/bitcoin/bitcoin/pull/31835/commits/9e29653b424b324c753526fbbf9fdbc92e88244f
Note that this test is for a bug that was fixed independently in Bitcoin ABC in D5041
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18795