Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: btctoo on May 19, 2020, 07:30:21 PM



Title: cancel unconfirmed tx
Post by: btctoo on May 19, 2020, 07:30:21 PM
I need to cancel an unconfirmed tx as soon as possible, its reaching the wrong address

I tried sending equal amount to my address

tx to be cancelled: https://www.blockchain.com/btc/tx/1ffac0a4033b762af803439b4b145e8fe4caed20f2a9b3c975b63d20fc009bc7
tx, i tried sending equal amount to own address: https://www.blockchain.com/btc/tx/996d19347d92291c285d07df223194da27ff62e860123ca2d28450b1fa60a1be

I am using electrum


Title: Re: cancel unconfirmed tx
Post by: jackg on May 19, 2020, 07:32:44 PM
What client are you using and is rbf configured?

Can you share the txid here also it'll help anyone to send you a new tx to sign if you don't want to do it yourself? If the fee is above 180 sats per byte you might need to be quick, if it's below then you'll be fine for a few hours...


Title: Re: cancel unconfirmed tx
Post by: btctoo on May 19, 2020, 07:36:33 PM
What client are you using and is rbf configured?

Can you share the txid here also it'll help anyone to send you a new tx to sign if you don't want to do it yourself? If the fee is above 180 sats per byte you might need to be quick, if it's below then you'll be fine for a few hours...

https://imgur.com/a/B1ryNwu
tx is in the post


Title: Re: cancel unconfirmed tx
Post by: Rath_ on May 19, 2020, 07:39:02 PM
-snip

You cannot cancel a transaction. Electrum does not support Full RBF so creating a conflicting transaction is not easy. Since that transaction is replacable, you can attempt to double-spend. You have to modify the wallet file (https://blog.blockonomics.co/how-to-double-spend-bitcoin-using-electrum-no-technical-sorcery-required-78799b07cad7) first (delete the unconfirmed transaction) before creating another one spending the same inputs.


Title: Re: cancel unconfirmed tx
Post by: jackg on May 19, 2020, 07:41:38 PM
-snip

You cannot cancel a transaction. Electrum does not support Full RBF so creating a conflicting transaction is not easy. You have to modify the wallet file (https://blog.blockonomics.co/how-to-double-spend-bitcoin-using-electrum-no-technical-sorcery-required-78799b07cad7).

Unless you have a second compy on a phone or another device then yes you'll have to edit and reimport the transaction.

I think I managed to get away with taking the device offline, editing the transaction, deleteing the one that was there and unconfirmed and importing the new transaction when I did it but it's been a while...


Title: Re: cancel unconfirmed tx
Post by: btctoo on May 19, 2020, 07:46:53 PM
any guide


Title: Re: cancel unconfirmed tx
Post by: Rath_ on May 19, 2020, 07:55:52 PM
any guide

I have already linked you a guide on removing a transaction from the wallet in the post above. This should be enough since you only need to create a new transaction with the same inputs after that. If you have a problem with that then you can enable Coins tab (View -> Show Coins) and select the same UTXOs (or at least one of them) from there (right-click and select 'Spend'). Why would you send transactions to yourself when transaction fees are extremely high?


Title: Re: cancel unconfirmed tx
Post by: jackg on May 19, 2020, 08:14:41 PM
The simplest way I can think of:
Take your computer offline
Go through the inputs that fund the transaction you want to change and import them into your new wallet (all but the last transaction can be imported without damagije anything but you'll only need the ones relevant that fund it).
Then go and just generate a new transaction in the preview tab, click sign and once its signed, click to broadcast the new transaction at a higher fee.

[edit]

You can just import the one input to invalidate the rest of them.


Title: Re: cancel unconfirmed tx
Post by: joniboini on May 20, 2020, 05:04:43 AM
Why would you send transactions to yourself when transaction fees are extremely high?

It is possible OP is paying for some service and put the wrong address so he wanted to send the money back because the invoice expired. But anyway, if it's not that, might as well send it to the correct address to save some fees.


Title: Re: cancel unconfirmed tx
Post by: nc50lc on May 20, 2020, 06:30:38 AM
tx to be cancelled: https://www.blockchain.com/btc/tx/1ffac0a4033b762af803439b4b145e8fe4caed20f2a9b3c975b63d20fc009bc7
tx, i tried sending equal amount to own address: https://www.blockchain.com/btc/tx/996d19347d92291c285d07df223194da27ff62e860123ca2d28450b1fa60a1be
It wont work like that, the client will always use an unspent transaction outputs (UTXO) to make a new transaction.
In your case, the second transaction only spent the unspent output (change) of the first unconfirmed transaction because there's no other UTXO to use.
Otherwise, it will be displayed as "insufficient balance".

jackg's method is the simplest, it only involves copy-pasting strings or scanning QR codes,
but it's riskier than BitCryptex' link because it involves exportation of private key(s).

But the transaction was now confirmed.


Title: Re: cancel unconfirmed tx
Post by: tianxie on May 20, 2020, 08:03:00 PM
I need to cancel an unconfirmed tx as soon as possible, its reaching the wrong address

I tried sending equal amount to my address

tx to be cancelled: https://www.blockchain.com/btc/tx/1ffac0a4033b762af803439b4b145e8fe4caed20f2a9b3c975b63d20fc009bc7
tx, i tried sending equal amount to own address: https://www.blockchain.com/btc/tx/996d19347d92291c285d07df223194da27ff62e860123ca2d28450b1fa60a1be

I am using electrum


you need to wait 24hrs


Title: Re: cancel unconfirmed tx
Post by: pooya87 on May 21, 2020, 02:11:05 AM
~
you need to wait 24hrs

the transaction OP was trying to "cancel" is already confirmed. not to mention that after 24 hours nothing would have changed, the nodes would continue having that transaction in their mempool. in fact the time they keep it was increased to 14 days a couple of years ago. even after 14 days there still is going to me nodes that have the transaction and can propagate it again.