The comparison test framework was introduced in #5981 as a successor to the Java comparison tool, following discussion in #4545. The Java comparison tool was finally removed in #8504.
The python comparison test framework was originally intended to start multiple bitcoind nodes on different versions, send various blocks/transactions to those nodes, and compare that the nodes reach the same state. However, the tests are now usually run through the test_runner.py framework with only one node being run. The comparison part of the comparison test framework is not even used.
Tests written in the ‘comparison’ style make use of TestManager
and TestInstance
classes and yield statements throughout the test. The framework is overly complex and not flexible enough to be really useful. In addition, they’re difficult to write, understand, update and troubleshoot. There are only 7 tests which use the comparison test style - we should rewrite them in the regular BitcoinTestFramework style.
subtasks
- Convert bip65-cltv-p2p.py to use the BitcoinTestFramework (#10695)
- Convert bipdersig-p2p.py to use the BitcoinTestFramework (#10695)
- Convert invalidtxrequest.py to use the BitcoinTestFramework (#11771)
- Convert p2p_invalid_block.py to use the BitcoinTestFramework (#11772)
- Convert feature_block.py to use the BitcoinTestFramework (#11773)
- Convert feature_csv_activation.py to use the BitcoinTestFramework (#11817)
- Delete redundant feature_bip9_softforks.py (#11818)
- Remove the ComparisonTestFramework code (#11818)