Author

Topic: Is there any solution to "repair" conflicted transaction? (Read 2197 times)

newbie
Activity: 7
Merit: 0
Yes there is a way to repair a conflicted transaction.
A conflicted transaction is a not-accepted transaction. It is not the same a double spend, because a conflicted transaction is not saved in the blockchain. It takes a lot of effort to make a double spend, I can't think of anyone who has achieved this.

I was rescanning my bitcoin wallets from 2013 and 2015, because they are worth more now. It turned out to be the exact same wallet, and I made payments from these two wallets to my v0.20.0 BTC client.
I didn't even wait till the wallet was rescanned, and frankly i spended bitcoins i didn't own. So the transaction was conflicted and stuck in the mempool before reaching a block. So then I had two wallets with a conflicting transaction.

What do you do in this case?

  • Go to the Bitcoin Core datadirectory and rename the mempool.dat file
  • Restart Bitcoin Core with the -walletbroadcast=0 option
  • Go to the transactions list, right click the transaction that is stuck. It is no longer greyed out! Choose the Abandon Transaction option.  
   
Quote
qt-bitcoin.exe
should be fully up-to-date with the blockchain.
Go to your conflicted wallet's transactions and copy the transaction ID of the transaction you should delete.
Then go in the console and export the wallet to a textfile.
Quote
dumpwallet editthis.txt
It's in the same directory as
Quote
'qt-bitcoin.exe'
.
Have a texteditor with linenumbers. Find the line with the transaction ID, say it's line 678 of a textblock starting at line 5. Now go to the empty line halfway of the textfile, say the first line of the next block is 3413. Now that textblock is just as long as the first block of text.
Code:
(l - 3413) = (678-5) => l = 4086
And that line should be deleted now. After that, delete line 678.
Don't mess this up or you'll end up a loosing money!
line 678:
Code:
KzCScG4SW .. jfGgV22HE 2013-11-18T18:43:42Z reserve=1 #addr=bc1q0rzxfw5v .. 9hjf5gdmjs26
is a secret encoded key, the date and time, transaction label, and input/output address.

line 4086:
Code:
0014118ae8ba .. 7f9b1ba9eb2d93 0 script=1 # addr=37ZT8tAq9m .. xSiB7SJfJYmLM
are tuples of the same data, they only have encoded data.

So delete these lines and now go to the BTC client console
Quote
importwallet editedthis.txt
Now the full blockchain will be rescanned with your wallet, it will take four hours or so.
Go to the Bitcoin Core datadirectory and rename the mempool.dat.old to mempool.dat file
Restart the client.

And you have your BTC back!
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
Your wallet was never accepted into a block by any miner and the TX has been dropped out of the mempool. Check your address and check if the inputs remain unspent/ if you spent it already and it is confirmed. If it is, open CMD by using run and navigate to your Bitcoin Core directory by using
Code:
cd C:\Program Files\Bitcoin
or whatever directory you selected. Then use this command to delete the conflicting transaction.
Code:
bitcoin-qt.exe -zapwallettxes
staff
Activity: 3458
Merit: 6793
Just writing some code
What is the transaction id of that transaction?

Typically Bitcoin Core shows the conflicted message when there is a double spend. However, if you sent the transaction yourself, then that means there is something very wrong. It could mean that someone else has compromised your computer and stolen your private keys. Or you are trying to send a transaction for an address that has its private key published.
newbie
Activity: 17
Merit: 0
Okay, so I made transaction of 0.15BTC which never got confirmed. I used latest version of Bitcoin-QT wallet. Now my wallet says that transaction is !conflicted.
Maybe it was so called "double spend" transaction, I'm not sure, but I think I got those 0.15BTC back.

Is there any solution to repair this same transaction? I mean is it possible to get this transaction confirmed?

Blockchain says:
Transaction rejected by our node. Reason: Transaction was previously accepted but has been pruned from our database.

I hope someone can help me with this.

Thank you!
Jump to: