[test] Add regression test for D16879
Summary:
Add a test to show that an attacker cannot clear the download state for other peers by send an invalid mutated block.
This is a partial backport of core#29412
https://github.com/bitcoin/bitcoin/pull/29412/commits/5bf4f5ba32da4627f152b54d266df9b2aa930457
Test Plan:
Run this test before and after D16879, to show that the test failed before and works after this diff
git checkout 2701a514b014122ad024b6d2cf9e0098cd7adc5b ninja && test/functional/test_runner.py p2p_mutated_blocks git checkout 5a3dd8183dfc2459aa976deccff2b4f03a737180 ninja && test/functional/test_runner.py p2p_mutated_blocks
A minor patch is required in blocktools.py to make this test work on those old commits: add the txlist argument to create_coinbase (see D17691)
Reviewers: #bitcoin_abc, roqqit
Reviewed By: #bitcoin_abc, roqqit
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18005