Bitcoin Forum

Bitcoin => Electrum => Topic started by: Sam Spade on January 02, 2017, 08:38:43 AM



Title: Cancel Payment
Post by: Sam Spade on January 02, 2017, 08:38:43 AM
I recently sent a payment and have not had it confirmed after several hours of waiting.  So, I would like to cancel it.  I know this is possible in Armory, so it must be also possible in Electrum.

Can someone please give me instructions on how to do it?

Please forgive if this is a duplicate post, as there is no indication at my end that the original request was posted and I got several error messages when I tried to post it.


Title: Re: Cancel Payment
Post by: ranochigo on January 02, 2017, 10:39:04 AM
I recently sent a payment and have not had it confirmed after several hours of waiting.  So, I would like to cancel it.  I know this is possible in Armory, so it must be also possible in Electrum.
Electrum does have opt-in Replace-By-Fee option. You can easily make another transaction if you enabled it in that unconfirmed transaction.
Can someone please give me instructions on how to do it?

Please forgive if this is a duplicate post, as there is no indication at my end that the original request was posted and I got several error messages when I tried to post it.
It's not super easy and this won't be successful unless the majority of the node's mempool has your transaction dropped and is willing to relay it. It can be risky so be sure to make sure that you have made a backup.
1. Make a backup of your wallet file in Electrum. For example, for windows, it is located in %appdata%/Electrum/Wallets.
2. Next, make sure to copy your wallet elsewhere or you can mess up things pretty badly.
3. Open your wallet file with your favourite text editor.
4. Use the find function to find your transaction.
5. Delete all the entries related to that transaction.
For example, if your transaction is 12df649e8dec89c221de178280e4b442b6ddff5bc326fc2630a29bf5e2649478,
Delete these kinds of entries like this:
"12988de5173d0e0fad5f1b8f9305a0988f345f6ddbf502d92d0ef92671ee7787": {},
        "12b945dad9aa388f5be4f6342c426c169089315ba41c74965f84554dea67004d": {
            "192fqgb5aCKrjNkudGqSWR6Nuu4J8tEMB7": [
                [
                    "61de18d1ba6725acc5e2c6aa273f65f0e75da4d1ffac8f790ac73b028362c0df:1",
                    20624178
                ],
                [
                    "01eb30b8a9e74fac36b15ee701b71746b3494a7386cda9b5583bb2215c8f3be3:0",
                    11990000
                ]
            ]
        },
        "12df649e8dec89c221de178280e4b442b6ddff5bc326fc2630a29bf5e2649478": {
            "192fqgb5aCKrjNkudGqSWR6Nuu4J8tEMB7": [
                [
                    "54d34359afa59e5ef44b63308c38c645ddce928ec8848ea2d7f7f13e004539f5:1",
                    7042200
                ]
            ]
        },

        "135cd1c66e411f1aa5b64607f9d690a0e337370740fd893b711894aaa2c20f50": {
            "192fqgb5aCKrjNkudGqSWR6Nuu4J8tEMB7": [
                [
                    "d1f58b9b75ce99fa560379d48ea91c1926114080c2eaac99f4ede9340ac4c6e4:0",
                    307708
                ]
            ]
        },

Just delete the bold part.
6. Next, just simply turn your internet connection off and script another transaction. Click preview, save and copy your signed raw transaction out by opening it with a text editor.