Mutant created against commit b821585.
+1 -1 · cpp
This description is AI generated, mistakes can be made.
Intent: Narrow the 'this is a test network' predicate from 'any chain but mainnet' to 'regtest only', so testnet3, testnet4 and signet fall back to the hardcoded mainnet constants for the warning checker.
Behaviour change: On testnet/testnet4/signet the original requires 1512 of 2016 blocks (75%) signalling an unknown bit before warning; the mutant requires 1815 (90%). (period is 2016 on those chains either way, so only the threshold moves.) A real unknown-softfork activation on testnet at 75-89% support now produces no warning at all, while the node still follows the chain.
Trigger: A signet or testnet4 node, out of IBD, receiving a retarget period in which ~80% of blocks set an unknown bit in 0..4: master warns 'Unknown new rules activated (versionbit N)' and fires -alertnotify, the mutant stays silent.
Spec violation: BIP 9 selection guidelines / Core convention: test networks use the 75% threshold ('1512 for testchains'), which is precisely what the comment on the next line still claims the code does.
Severity if undetected: low
Why tests miss it: feature_versionbits_warning.py is the only test of this class and runs on regtest, where IsMockableChain() is also true (kernel/chainparams.cpp: m_is_mockable_chain is set true only for regtest), so it is unaffected; no functional test runs the warning path on testnet/signet; versionbits_tests.cpp never instantiates WarningBitsConditionChecker (it is in an anonymous namespace)
Plausibility: IsTestChain() and IsMockableChain() are adjacent one-line accessors in kernel/chainparams.h and are routinely confused; picking the 'more specific' one looks like a tightening rather than a bug.
Equivalence risk: On mainnet and regtest the two predicates select the same branch, so only testnet/signet behave differently - and there the difference is one threshold value that no test exercises.
Commands and environment reported by the submitter
cmake -B build -DBUILD_GUI=OFF -DWITH_ZMQ=OFF -DENABLE_IPC=OFF && cmake --build build -j$(nproc)ctest --test-dir build -j$(nproc) && build/test/functional/test_runner.py -j$(nproc)mutant-harness operator: condition; location: WarningBitsConditionChecker::WarningBitsConditionChecker lines 312-315
Imported from mutant-harness 6cd939b.
Commands are shown as text and never executed by MutantHub.
0 comments
No comments yet
Discuss equivalence, reproduction difficulties, or a test that kills this mutant.