Skip to content

Add magic enforcement of tx.locktime values #403

@rkalis

Description

@rkalis

In the protocol, the value of tx.locktime is only enforced if at least one input is non-final (NOT 0xFFFFFFFF sequence number). When executing require(tx.time >= <x>), this is automatically enforced, so currently, in order to safely use the value of tx.locktime, smart contract developers need to add a require(tx.time >= <x>) somewhere in their contract.

If a user uses tx.locktime, but no require(tx.time >= x) check exists within the branch where tx.locktime is accessed, then the compiler could add a require(tx.time >= 0) check to enforce the value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cashc-compilerRelates to the cashc compiler

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions