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.dat1. 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 FIRST6. 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