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.
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.
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.
(l - 3413) = (678-5) => l = 4086
Don't mess this up or you'll end up a loosing money!
line 678:
KzCScG4SW .. jfGgV22HE 2013-11-18T18:43:42Z reserve=1 #addr=bc1q0rzxfw5v .. 9hjf5gdmjs26
line 4086:
0014118ae8ba .. 7f9b1ba9eb2d93 0 script=1 # addr=37ZT8tAq9m .. xSiB7SJfJYmLM
So delete these lines and now go to the BTC client console
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!