4

Transactions with outputs whose sequence is smaller than UINT_MAX are interpreted as locked until the timestamp or block height specified in nLockTime is reached.

Specifically regarding the block height, I read imprecise or disagreeing information on whether a transaction may be included in a block of height > nLockTime or height ≥ nLockTime. Which of the two is the case?

Murch
  • 71,155
  • 33
  • 180
  • 600

1 Answers1

3

A transaction becomes valid when the chaintip reaches the height specified in the locktime, and may be included in any block with a height greater than nLockTime.

    if ((int64_t)tx.nLockTime < ((int64_t)tx.nLockTime < LOCKTIME_THRESHOLD ? (int64_t)nBlockHeight : nBlockTime))
    return true; 

via https://github.com/bitcoin/bitcoin/blob/v0.19.0.1/src/consensus/tx_verify.cpp#L21L22

H/T Pieter Wuille for code section and explanation.

Murch
  • 71,155
  • 33
  • 180
  • 600
  • 2
    Filed a pull request to correct the Bitcoin Developer Documentation: https://github.com/achow101/btcinformation.org/pull/32 – Murch Dec 19 '19 at 02:34
  • Also filed a PR to correct Bitcoin Developer Documentation here: https://github.com/bitcoin-dot-org/bitcoin.org/pull/3237 – Murch Jan 16 '20 at 21:33