Post
Topic
Board Bitcoin Technical Support
Topic OP
[GUIDE] Cancel your 0/unconfirmed transactions
by
jackjack
on 24/07/2011, 21:27:16 UTC
This is far less efficient than using the new pywallet, see here: https://bitcointalk.org/index.php?topic=35214.0

Hi all
While playing with the bitcoin client, I made some 0/unconfirmed transactions (no confirmation for 2 days)
I didn't find anything simple to recover the bitcoins lost

When I finally found a method to cancel those transactions I made a python script to make that simple

So, are those unconfirmed transactions still a problem?
If so I'll write here how to cancel them


Here it is:
0. I'm assuming that your wallets are in Bitcoin default directory, if not, use -w and -n options at step 6
1. Backup your broken wallet.dat
2. Rename it wallet.old
3. Find the wallet into which you want to add the old adresses (you can run bitcoin to create a brand new one) and rename it  wallet.new
4. Download my pywallet fork: https://github.com/jackjack-jj/pywallet and write down the directory you put it
5. Download my walletco: https://github.com/jackjack-jj/walletco
6. Assuming both wallet.new and wallet.old are in bitcoin default directory(if not, look at walletco options), run this: /path/to/walletco.py -p /pywallet/directory/ -W wallet.old -N wallet.new
7. Rename wallet.new to wallet.dat (or use my bitcoin fork to chose the walletfile)

In the next release, walletco will auto backup both wallets

Feel free to make pull requests and tell me if it fixed your wallet