mempool: remove all subsequent tx in pkg on failure #35017
pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:2026-04-remove_all_consensusscript changing 1 files +4 −0-
instagibbs commented at 8:52 pm on April 6, 2026: memberThis belt-and-suspenders check, if ever hit in production, could result in an inconsistent mempool if somehow the parent failed in the ConsensusScriptChecks but the child did not. Rather than allow the mempool to get in an inconsistent state, remove the following txs in the package.
-
DrahtBot added the label Mempool on Apr 6, 2026
-
DrahtBot commented at 8:52 pm on April 6, 2026: contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
LLM Linter (✨ experimental)
Possible typos and grammar issues:
subsequent in package->subsequent txs in the package[The phrase is missing the noun (“txs”/“transactions”), making the intended meaning unclear without guessing.]
2026-04-08 18:21:31
-
in src/validation.cpp:1272 in 9a8cbc6356
1265@@ -1266,6 +1266,10 @@ bool MemPoolAccept::SubmitPackage(const ATMPArgs& args, std::vector<Workspace>& 1266 ws.m_ptx->GetHash().ToString())); 1267 // Remove the transaction from the mempool. 1268 if (!m_subpackage.m_changeset) m_subpackage.m_changeset = m_pool.GetChangeSet(); 1269+ } 1270+ // Remove first failing tx and all subsequent in package 1271+ if (!all_submitted) { 1272+ Assume(m_subpackage.m_changeset);
luke-jr commented at 6:16 pm on April 8, 2026:Should be Assert, since the next line will nullptr deref if the check fails
instagibbs commented at 6:21 pm on April 8, 2026:changed623796abdfmempool: remove all subsequent tx in pkg on failure
This belt-and-suspenders check, if ever hit in production, could result in an inconsistent mempool if somehow the parent failed in the ConsensusScriptChecks but the child did not. Rather than allow the mempool to get in an inconsistent state, remove the following txs in the package.
instagibbs force-pushed on Apr 8, 2026Labels
Mempool
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-12 09:13 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-12 09:13 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me