Skip to content

Developer doc does not match Bitcoin Core for locktime standard rule #3727

@daira

Description

@daira

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions