Mempool trimming regression: removes local wallet transactions #6959
issue luke-jr openend this issue on November 6, 2015-
luke-jr commented at 9:37 am on November 6, 2015: member#6722 introduces the possibility of removing transactions generated by the local wallet from its mempool, but fails to update CMerkleTx::GetDepthInMainChain which assumes a transaction neither in the blockchain nor the mempool must be conflicted. Since the wallet transaction is now assumed to be conflicted, the wallet will happily produce a double-spend using the same inputs again.
-
jonasschnelli commented at 9:45 am on November 6, 2015: contributor
During another case i was also stumbling over a
GetDepthInMainChain()inconsistency. IMO the wallet should keep it’s own height cache or even it’s own headers-only-chain (anyways required in case of process separation).But anyways; the bitcoin-core local wallet (and other wallets) need to find a way to handle removed transactions from the mempool without marking them as conflicted.
But you are saying using inputs from a conflicted transaction results in a double-spend? The transaction was removed from the mempool and is not in the chain,… that means it’s available again for coin selection, isn’t it?
-
luke-jr commented at 9:50 am on November 6, 2015: memberIn most cases, it means the wallet wishes to keep it in the mempool and rebroadcast until it is mined.
-
jonasschnelli commented at 10:09 am on November 6, 2015: contributorYes. Such use cases, together with the FSS-RBF (or CPFP) need to be handled by the wallet.
-
laanwj added the label Wallet on Nov 6, 2015
-
jgarzik commented at 12:43 pm on November 6, 2015: contributorYes - this problem was the same one that merge-blocked mempool janitor… Need to solve for local wallet
-
laanwj added the label Mempool on Nov 6, 2015
-
sturles referenced this in commit b79c9f2be6 on Nov 12, 2015
-
MarcoFalke commented at 0:04 am on April 27, 2020: memberIs this still an issue with a recent version of Bitcoin Core? If yes, what are the steps to reproduce?
-
MarcoFalke closed this on Apr 27, 2020
-
DrahtBot locked this on Feb 15, 2022
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-08 03: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-08 03: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