Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: BicameralMind on April 01, 2019, 08:55:30 PM



Title: When Unmined Transactions Mempool Expire do Their Child also expire?
Post by: BicameralMind on April 01, 2019, 08:55:30 PM
Quick question, that I'm having trouble finding in the official documentation. What happens to the child transactions when their parents expire in the mempool? For example say you three un-mined transactions in the mempool. TxC spends the outputs of TxA and TxB:

Transaction A <-----_------ Transaction C    
Transaction B <----/

Now let's say Transaction A is evicted from the mempool for being around too long without getting mined. Is Bitcoin Core "smart" enough to realize that Transaction C is now unspendable? I.e. will it evict it along with A, right away? (Thus unlocking Transaction B to be spent somewhere else?) Or will it wait for Transaction C to stick around the full 72 hours?



Title: Re: When Unmined Transactions Mempool Expire do Their Child also expire?
Post by: nc50lc on April 02, 2019, 01:51:04 AM
If it's just the mempool, the user can always re-spend the output from his broadcasted transaction by deleting his own mempool (-zapwallettxes).
(There no general "mempool", individual nodes have its own mempool and the amount of transactions can be different)

This makes inputs from Transaction B spendable as long as the TX B was dropped from the owner's node, but Tx C will never get confirmed for being invalid.

Other nodes may keep both TX C and B in their mempool since Bitcoin transactions have no "expiration" limit (https://en.bitcoin.it/wiki/Transaction_expiration).
It will expire in 14 days by default, but some may have set a higher value [-mempoolexpiry=8765 (1 Year)].