Author

Topic: [GUIDE] Cancel your 0/unconfirmed transactions (Read 6499 times)

member
Activity: 92
Merit: 10
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

I love you, in a platonic way, for doing this!  Awesome! Smiley
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
It must be something along those lines, because it looks like my debits/credits match.
Please keep me updated, I'd like to know if it's useful
member
Activity: 224
Merit: 10
If the transaction was broadcast it could go through at any time until you make a new transaction that spends it first?
Your sentence is too complicated for my poor english Grin
But if understand correctly, what you want to do is :
- make a transaction
- make your wallet forget it
- make a new transaction that spend the same funds than the first one
- hope the last one gets written in the blockchain before the first one

If you remove also your blockchain history, I believe it could work if the second transaction reachs a miner before the first

Are you thinking about the merchants who accept funds before being confirmed? Wink
Yup thanks.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
If the transaction was broadcast it could go through at any time until you make a new transaction that spends it first?
Your sentence is too complicated for my poor english Grin
But if understand correctly, what you want to do is :
- make a transaction
- make your wallet forget it
- make a new transaction that spend the same funds than the first one
- hope the last one gets written in the blockchain before the first one

If you remove also your blockchain history, I believe it could work if the second transaction reachs a miner before the first

Are you thinking about the merchants who accept funds before being confirmed? Wink
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Thanks for your help on this. The transaction was removed from the wallet, but the funds did not change. Maybe there is something else wrong with my wallet?

I am on Win7 so I...
1. Backed up my broken wallet.dat
2. Renamed it wallet.old and left in Bitcoin directory
3. Created a new wallet.new in Bitcoin directory
4. Downloaded Python x64
5. Installed to C:\Python
6. Downloaded and extracted your pywallet fork to C:\Python
7. Downloaded and extracted walletco to C:\Python. (Check the link in OP.)
8. Opened a command window and ran this line "python walletco.py -p /python/ -W wallet.old -N wallet.new"

Shows "Importing: 100.00%"
First, DO NOT write here the privkeys (starting in 5), be sure to remove them all if you paste here the code in the console

Before "Importing:100%", what was written?
If it was like that, your new wallet has all the old keys:

Code:
Address: 1AdDressxxxxx
Privkey: 5xxxxxxx
Imported successfully

If not, please paste a little sample (again, remove the privkeys)


If debits/credits match, you should perform a -rescan
sr. member
Activity: 280
Merit: 253
It must be something along those lines, because it looks like my debits/credits match.
member
Activity: 224
Merit: 10
If the transaction was broadcast it could go through at any time until you make a new transaction that spends it first?
sr. member
Activity: 280
Merit: 253
Thanks for your help on this. The transaction was removed from the wallet, but the funds did not change. Maybe there is something else wrong with my wallet?

I am on Win7 so I...
1. Backed up my broken wallet.dat
2. Renamed it wallet.old and left in Bitcoin directory
3. Created a new wallet.new in Bitcoin directory
4. Downloaded Python x64
5. Installed to C:\Python
6. Downloaded and extracted your pywallet fork to C:\Python
7. Downloaded and extracted walletco to C:\Python. (Check the link in OP.)
8. Opened a command window and ran this line "python walletco.py -p /python/ -W wallet.old -N wallet.new"

Shows "Importing: 100.00%"

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
First post edited
sr. member
Activity: 280
Merit: 253
Yes. How do you cancel them?
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
Check how many blocks your client downloaded
If it's 137873, your transaction should have some confirmations
newbie
Activity: 58
Merit: 0
Yes I have one unconfirmed but I believe its because my block chain won't download even with two connections
full member
Activity: 238
Merit: 100
was a problem for me. i had to use berkeleydb tools to remove those transactions
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
This is far less efficient than using the new pywallet, see here: https://bitcointalksearch.org/topic/guide-delete-your-0unconfirmed-transactions-in-30-seconds-35214

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
Jump to: