Bitcoin’s nLockTime field delays when a particular transaction can be mined. To enforce a time condition on a spending path itself, a script can use CHECKLOCKTIMEVERIFY, usually called CLTV. The difference becomes important when another signed transaction could spend the same coins without the original delay.
| What you need to know |
|---|
| nLockTime places a time or block-height condition on a transaction. |
| A different signed transaction may spend the same output without that delay. |
| CLTV compares a script condition with the spending transaction's nLockTime. |
| A script can offer an immediate cooperative path and a delayed recovery path. |
The distinction appears in the motivation for BIP65, the CLTV specification. A pre-signed transaction carrying nLockTime can demonstrate that a future spend is possible. On its own, it cannot establish that an earlier spend is impossible: another valid signature may exist for a different transaction spending the output. The field describes that transaction’s eligibility, rather than an unconditional promise about every possible spend of those coins.
What CLTV actually compares
When an executed script reaches CLTV, the instruction checks the value supplied on the script stack against the transaction’s nLockTime. The specification rejects a negative argument, a missing argument, a height-versus-timestamp type mismatch, or a script argument greater than the transaction’s locktime. It also rejects the final input sequence value 0xffffffff. Meeting just the apparent date in a wallet display therefore does not establish that this script path will validate.
For a hypothetical height-based path, suppose the script requires height 950,000 and a spending transaction sets nLockTime to 949,999. That path fails the comparison even if someone broadcasts the transaction later. Raising the transaction’s field to meet the script’s requirement addresses that comparison; the transaction must still meet the remaining validation and finality conditions. This is a protocol example, not a ready-to-use wallet command.
A recovery deadline can belong to one branch
BIP65’s escrow example gives two cooperating participants an immediate way to spend together. A separate branch becomes available after the specified delay and allows a third participant to cooperate with either original participant. The delay applies to that recovery branch. It does not prevent the two original participants from using their cooperative branch earlier.
That structure is useful when reading a claim that funds are locked until a date. The claim needs to identify the spending conditions: a delayed recovery route can coexist with an earlier cooperative route. A displayed locktime alone omits which branch is being used and who can satisfy it. Our explanation of block-based waiting periods covers the separate question of how a waiting interval relates to clock time.






