https://github.com/bitcoin/bitcoin/blob/9faa4b68db80a4a5c1f5a4e0484d804d7b5e1493/src/consensus/tx_verify.cpp#L21 :
if (tx.nLockTime == 0)
return true;
if ((int64_t)tx.nLockTime < ((int64_t)tx.nLockTime < LOCKTIME_THRESHOLD ? (int64_t)nBlockHeight : nBlockTime))
return true;
https://developer.bitcoin.org/devguide/transactions.html#non-standard-transactions :
As of Bitcoin Core 0.9.3, standard transactions must also meet the following conditions:
- The transaction must be finalized: either its locktime must be in the past (or less than or equal to the current block height), or all of its sequence numbers must be 0xffffffff.
These do not match; "less than or equal to" should be "less than". Also it could be clearer that whether the restriction is time-based or height-based depends on whether the field is less than LOCKTIME_THRESHOLD = 500000000.