Mutant created against commit b821585.
+2 -1 · cpp
This description is AI generated, mistakes can be made.
Intent: Break the reported activation height: ACTIVE is a terminal state, so whenever current_state is ACTIVE next_state is ACTIVE too, and un-chaining the branches makes the second assignment always win.
Behaviour change: For an active bip9 deployment the original reports the height at which it activated (BIP9Info::active_since = since); the mutant reports the height of the next block, so getdeploymentinfo's bip9 'height' field tracks the tip and changes with every block. The 'active' boolean is unaffected (active_since <= nHeight+1 still holds).
Trigger: getdeploymentinfo on regtest once testdummy is ACTIVE (height >= ~432 with default regtest params): 'height' reads <tip+1> on every call instead of the fixed activation height; on mainnet the same would apply to any activated bip9 softfork.
Spec violation: versionbits.h: '/** Height at which the deployment is active, if known. May be in the future. */ std::optional active_since' - and rpc/blockchain.cpp exposes it as the deployment's activation height, the bip9 counterpart of a buried deployment's fixed 'height'.
Severity if undetected: medium
Why tests miss it: rpc_blockchain.py never reaches an ACTIVE testdummy (it stops at height 287 and asserts 'active': False); grepped test/functional for softfork_active/getdeploymentinfo users - all of them (feature_cltv, feature_dersig, wallet_signrawtransactionwithwallet, feature_bip68_sequence, feature_csv_activation) query buried deployments, which take the other SoftForkDescPushBack overload; interface_rest.py only compares REST against the same RPC
Plausibility: Splitting an if/else-if into two ifs is a routine-looking edit (e.g. while adding a third case), and both branches assign the same field, so the diff reads as a no-op unless you remember that ACTIVE is terminal.
Equivalence risk: For a deployment that is not ACTIVE the behaviour is identical; the divergence needs current_state == ACTIVE, which no test ever inspects.
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: scope; location: VersionBitsCache::Info lines 219-223
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.