2

Can somebody please help me? I have been trying to send .045 Bitcoins (approx $120 USD)

I am using Bitcoin Core.

I have tried to get rid of the unconfirmed transaction by using -zapwallettxes However.. when I re-boot Bitcoin Core v0.14.1 (64-bit) without the zapwallet command.. it still shows as unconfirmed and now it appears to be stuck. I am afraid it is a duplicate transaction and I'll never get my Bitcoins back before now I am at 0 after reboot.. and even worse the address keeps telling me they haven't received anything...

What do I do?

2 Answers 2

4

Since 0.14.0 the mempool is stored on disk when Bitcoin Core is closed. To apply -zapwallettxes to remove a transaction you also have to delete the mempool.dat as the transaction is otherwise reintroduced into the wallet when the mempool is imported.

To remove an unconfirmed transaction with 0.14.0 you have to:

  1. Shut down Bitcoin Core.
  2. Find your Bitcoin directory
  3. Delete mempool.dat in the Bitcoin directory
  4. Start Bitcoin Core with -zapwallettxes

Previous versions didn't persist the mempool to disk, so step 1. and 4. are sufficient to remove an unconfirmed transaction.
The interaction of -zapwallettxes and the persisted mempool was fixed with Bitcoin Core 0.15.0, so it is sufficient to set -zapwallettxes after that again.

4
  • Thank you so much Murch, But how do I delete mempool.dat ?
    – Con John
    Jun 8, 2017 at 18:52
  • I don't have a mempool.dat!
    – Owl
    Jan 19, 2018 at 19:16
  • @Owl: And I don't have a Lambo. What's your point? ;) You might need to elaborate a bit what your question is, or if it exceeds what is sensibly treated in a comment section, ask another question and link it here. :)
    – Murch
    Jan 19, 2018 at 19:41
  • Hi Murch, you are correct, it wasn't a helpful comment, i've solved the problem and added an answer explaining how i solved it on older clients. It should work for newer clients also. I think i've also found out why the transactions stay in the mempool for much longer than 72 hours too.
    – Owl
    Jan 21, 2018 at 1:56
1

Murch's answer is correct, but to save additional searches: please note that older bitcoin qt clients don't have a mempool.dat file. Please note also that bitcoin-qt - as i understand it is the old name for Bitcoin Core.

For example the latest bitcoin-qt client for gentoo even after a sync is v0.13.1.0, which is really old. I'm a bit apprehensive about compiling from non repository sources because the wallet has access to my private keys and there are several versions of bitcoin-qt source code on github, and i'm paranoid about running a compromised one. Gentoo maintainers: please update your bitcoin-qt client!!

It is possible to check whether the transaction is stuck in the memory pool by right clicking on the transaction and clicking on "Show transaction details". If it's showing the transaction as in the memory pool with no confirmations, then proceed. If you have any confirmations, then stop now because it's already been sent.

Initially, I restarted bitcoin-qt -zapwallettxes. This removed my transaction out of the memory pool, however it was just re-added to the mempool when the client was restarted. So that's not the correct solution to the problem for older clients.

To stop the transaction from re-entering the mempool, i restarted bitcoin-qt from CLI with the option: bitcoin-qt -mempoolexpiry=1

What this option does, is it sets the transactions in the mempool to expire after 1 hour rather than the default 72 hours. Note that I had to keep bitcoin-qt running for over an hour to get the mempool to expire. If you restart the bitcoin-qt client within this time, it appears that the countdown resets and you have to wait another whole hour. Perhaps this explains why some people find that their transactions have been stuck in their mempool for weeks - they've for whatever reason restarted their bitcoin-qt client before the 72 hour countdown has finished. This certainly was the case for me.

After an hour, the transaction was still unconfirmed, but right clicking on the transaction then allowed me to abandon the transaction - this button was previously grayed out.

As soon as I clicked that my bitcoin balance was updated, a dustbin icon appeared next to the transaction and I've had no further issues.

Remember to set your -mempoolexpiry option back to the default 72 hours...

...or something more sane.

2
  • Now I understand your comment much better. ;) BTW, newer versions of Bitcoin Core will keep transactions for 14 days in their mempool instead of 72h, so it may be readded to your mempool by being broadcast from another node even after 72h have passed.
    – Murch
    Jan 21, 2018 at 8:10
  • Thanks for the information. This is quite a scary problem when you first come across it.
    – Owl
    Jun 25, 2018 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.