Mutant created against commit 37912ec.
+3 -3 · cpp
This description is AI generated, mistakes can be made.
Intent: Clear() calls ClearLocalSetSnapshot(), which empties m_announced_while_reconciling, so the filter becomes a no-op and we re-announce to the peer txs it sent us during the round. This is medium rather than low because a peer can inflate our INV/tx traffic on every extension round.
Behaviour change: Original: after an extension round, txs the peer relayed to us mid-round are not announced back. Mutant: they are included in txs_to_announce and INVed to the peer that already gave them to us.
Trigger: Initiator side, extension round: after we snapshot at the failed initial sketch, the peer sends a TX/INV for a wtxid in our snapshot (TryRemovingFromSet / RemoveFromSets flags it in m_announced_while_reconciling). The peer then sends the extension SKETCH, which either decodes with that tx in the diff or fails (announce all of the snapshot).
Spec violation: Documented invariant in the file: 'Filter out transactions received from the peer while reconciling.'
Severity if undetected: medium
Why tests miss it: txreconciliation_tests.cpp (no initiator extension test; the RemoveFromSetsTest filter check is on the responder HandleReconcilDiff path), p2p_txrecon_initiator.py interleaved test covers only INIT_REQUESTED, not extension
Plausibility: Putting the 'update state' step next to the result computation and filtering last looks like harmless tidying. It is not obvious that Clear() wipes the filter set.
Equivalence risk: Equivalent only when m_announced_while_reconciling is empty, i.e. the peer sent nothing mid-round.
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) --failfastmutant-harness operator: reorder; location: TxReconciliationTrackerImpl::HandleSketchExtension lines 329-335
Imported from mutant-harness 474b4f7.
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.