Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: kookiekrak on July 24, 2011, 09:14:50 PM



Title: [GUIDE] FIX ANY UNCONFIRMED TRANSACTION ERROR!
Post by: kookiekrak on July 24, 2011, 09:14:50 PM
So a few days ago, my internet wasn't responding well and I sent a hefty chunk of btc to the same address twice. The first transaction went through, but the second died with 0/unconfirmed.

I thought this would be fine, and when my miner added more coins to it, I tried spending the new coins I made. Unfortunately, this new transaction decided to fail also and ended up with 0/unconfirmed.

How I fixed this error.


[WINDOWS]

FIRST BACKUP YOUR WALLET LOCATED AT  %appdata%/bitcoin/wallet.dat

1. Download berkeley db (http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html) version 4.7.25
I used the MSI installer since its the simplest.

2. Once you install it, open a command prompt ( run -> cmd )
3. And CD to the bin folder of berkeley db ( cd C:\Program Files\Oracle\Berkeley DB 4.7.25\bin )
4. Next, use db_dump to dump your current wallet to a new text file ( db_dump  %appdata%/bitcoin/wallet.dat >wallet.txt )
5. Open the wallet.txt with a text editor, and delete all of the lines that start with

02747
01000

These are all of the transaction entries in the wallet. They come in pairs, so for every 02747 line you delete, delete the following line that start with 01000
These should also be the first chunk of lines after
VERSION=3
format=bytevalue
database=main
type=btree
db_pagesize=8192
HEADER=END

THIS STEP WILL OVERRIDE YOUR WALLET. PLEASE BACK IT UP FIRST
6. Next, reload the text file back into a wallet.dat ( db_load -f wallet.txt %appdata%/bitcoin/wallet.dat)
7. Finally, restart bitcoin with the -rescan option to recreate all of your transactions! (bitcoin.exe -rescan)

Now your wallet should be fixed! And your bitcoins will be spendable again!
If I've helped you fix your wallet, donations accepted at: 179vLLc6qjkofkWhH84cN6kFvcd2VaoGKr


Title: Re: [GUIDE] Fixing a double spend error - 0/Unconfirmed bug
Post by: kookiekrak on July 26, 2011, 09:53:10 PM
bump. imo its better than running a python script since this uses official stuff. but w/e


Title: Re: [GUIDE] FIX ANY UNCONFIRMED TRANSACTION ERROR!
Post by: kookiekrak on August 05, 2011, 09:48:16 PM
bump


Title: Re: [GUIDE] FIX ANY UNCONFIRMED TRANSACTION ERROR!
Post by: proudhon on August 05, 2011, 09:52:35 PM
Thanks for the info.  Hopefully I won't have this problem again, but if I do I'll give this a try.


Title: Re: [GUIDE] FIX ANY UNCONFIRMED TRANSACTION ERROR!
Post by: hank on August 19, 2011, 10:15:17 AM
thank youuu