Bitcoin Forum
July 28, 2026, 07:41:51 AM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Schedule a transaction and possibility to cancel it before execution  (Read 139 times)
Etiquette.exe (OP)
Member
**
Online Online

Activity: 95
Merit: 80


View Profile
April 23, 2025, 03:19:29 PM
 #1

Hi guys,

I am trying to find out if I can schedule a Bitcoin transaction for a future date, but still cancel it until that date and if it is possible, how can I do it? I know that in a wallet software I can specify a block, which is fine, but how can I specify it more precisely and which software is the best? A block can vary a lot if it is far in the future. To take the transaction back, from my understanding it is not possible, or can I set it up that I can cancel it for as long as it has not finally been executed?

Thank you for helpful responses!
Chris
odolvlobo
Legendary
*
Offline

Activity: 5082
Merit: 3832



View Profile
April 23, 2025, 04:23:20 PM
Merited by ABCbits (2), garlonicon (1)
 #2

You can specify an actual time in the locktime field. To cancel the transaction, you spend the input UTXO before the transaction becomes valid.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
Etiquette.exe (OP)
Member
**
Online Online

Activity: 95
Merit: 80


View Profile
April 23, 2025, 04:57:57 PM
 #3

You can specify an actual time in the locktime field. To cancel the transaction, you spend the input UTXO before the transaction becomes valid.

In Electrum in the drop down ok, I can choose date and then specify it, but do I broadcast it then? I thought if I broadcast it, spending the input before the scheduled transactions becomes valid is not possible. Since it is if I get you right here, is there a way to set it up that the transaction will be executed at a future date without the possibility to stop it by spending the input before the specified date?
odolvlobo
Legendary
*
Offline

Activity: 5082
Merit: 3832



View Profile
April 23, 2025, 05:12:16 PM
Last edit: May 28, 2025, 05:02:56 PM by odolvlobo
 #4

I thought if I broadcast it, spending the input before the scheduled transactions becomes valid is not possible.

A transaction in the block chain invalidates all other transactions spending any of its input UTXOs. Nodes have rules about what to do with transactions using the same UTXOs, but I doubt any would not accept a transaction spending a UTXO already seen in a locked transaction.

Edit: This is not accurate. As pointed out below by @hosemary, nodes reject a transaction whose lock time has not yet passed.

Since it is if I get you right here, is there a way to set it up that the transaction will be executed at a future date without the possibility to stop it by spending the input before the specified date?

A transaction does not invalidate any other transactions until it is included in the block chain.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
LoyceV
Legendary
*
Offline

Activity: 4116
Merit: 22374


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
April 23, 2025, 06:15:33 PM
 #5

You may want to read my topic Using Locktime for inheritance planning, backups or gifts.

¡uʍop ǝpᴉsdn pɐǝɥ ɹnoʎ ɥʇᴉʍ ʎuunɟ ʞool no⅄
Etiquette.exe (OP)
Member
**
Online Online

Activity: 95
Merit: 80


View Profile
April 23, 2025, 08:33:40 PM
 #6

Thank you odolvlobo, I will have a closer look at LoyceV's link tomorrow and then see what questions I might still have.

Kind regards!
Chris
hosemary
Legendary
*
Offline

Activity: 3206
Merit: 7109



View Profile
April 23, 2025, 08:54:46 PM
Last edit: April 23, 2025, 09:12:43 PM by hosemary
Merited by odolvlobo (1), Cricktor (1)
 #7

You can specify an actual time in the locktime field. To cancel the transaction, you spend the input UTXO before the transaction becomes valid.
Any transaction with a locktime into the future will be rejected by the nodes and you have to broadcast your transaction after the locktime.
If the current time (or the current block height) is earlier than the locktime, the transaction hasn't been broadcasted, nodes don't have that in their mempool and there's nothing to be canceled at all.


Nodes have rules about what to do with transactions using the same UTXOs, but I doubt any would not accept a transaction spending a UTXO already seen in a locked transaction.
As I said nodes reject any transaction with a locktime into the futrue. Therefore, they don't keep such transactions in their mempool at all even if they have seen it.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!