What changed, and why it matters
This commit simply moves a single internal helper function, removeConflicts, from the public section of a C++ class to the private section in the header file. It does not change what the function does, how it behaves, or any executable code. It is a routine encapsulation/cleanup change with no security effect.
No action needed. Treat as a non-security encapsulation cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In src/txmempool.h, the declaration of CTxMemPool::removeConflicts(const CTransaction&) is relocated from the public: section to the private: section. The function signature, lock annotation (EXCLUSIVE_LOCKS_REQUIRED(cs)), and comment remain identical. No implementation changes are made, no call sites are modified, and no behavior is altered. This is a pure API-visibility refactor.
Changed components
src/txmempool.hInspect captured patch +4 / −1
diff --git a/src/txmempool.h b/src/txmempool.h
index 40f5ffeb..cdf9bcc9 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -320,6 +320,10 @@ private:
return TxMempoolInfo{it->GetSharedTx(), it->GetTime(), it->GetFee(), it->GetTxSize(), it->GetModifiedFee() - it->GetFee()};
}
+ // Helper to remove all transactions that conflict with a given
+ // transaction (used for transactions appearing in a block).
+ void removeConflicts(const CTransaction& tx) EXCLUSIVE_LOCKS_REQUIRED(cs);
+
public:
indirectmap<COutPoint, txiter> mapNextTx GUARDED_BY(cs);
std::map<Txid, CAmount> mapDeltas GUARDED_BY(cs);
@@ -352,7 +356,6 @@ public:
* and updates an entry's LockPoints.
* */
void removeForReorg(CChain& chain, std::function<bool(txiter)> filter_final_and_mature) EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main);
- void removeConflicts(const CTransaction& tx) EXCLUSIVE_LOCKS_REQUIRED(cs);
void removeForBlock(const std::vector<CTransactionRef>& vtx, unsigned int nBlockHeight) EXCLUSIVE_LOCKS_REQUIRED(cs);
bool CompareMiningScoreWithTopology(const Wtxid& hasha, const Wtxid& hashb) const;
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.