nLockTime
This page is a stub. Help by expanding it.
nLockTime is a parameter of a transaction, that, if any input indicates so (by having nSequence not equal to UINT_MAX), mandates a minimal time (specified in either unix time or block height), before which the transaction cannot be accepted into a block. If all inputs in a transaction have nSequence equal to UINT_MAX, then nLockTime is ignored.
Since BIP68, a new meaning has been given to the nLockTime and nSequence fields. Given a transaction,
- If the most significant bit (1<<31) is set
- If the 23rd bit (1<<22) is set
- Specifies a time in units of 512 seconds. The transaction can only be included in a block if
block_time > nLockTime * 512
.
- Specifies a time in units of 512 seconds. The transaction can only be included in a block if
- Otherwise
- Specifies a block height before which the transaction can not be included in a block.
- If the 23rd bit (1<<22) is set
- Otherwise
- the transaction can be included in any block
See Also
- lock_time in the protocol specification
- Timelock
- BIP68
- The CHECKLOCKTIMEVERIFY opcode in BIP65
- The CHECKSEQUENCEVERIFY opcode in BIP112