Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a LockTime type #994

Merged
merged 2 commits into from Jul 27, 2022
Merged

Commits on Jul 26, 2022

  1. Add a max scriptnum constant

    Integers within Script can have a maximum value of 2^31 (i.e., they are
    signed) but we (miniscript) often uses unsigned ints, to facilitate
    checking the unsigned type is the correct size to fit in a signed int
    add a const `MAX_SCRIPTNUM_VALUE`.
    tcharding committed Jul 26, 2022
    Copy the full SHA
    1390ee1 View commit details
    Browse the repository at this point in the history
  2. Add lock time types

    Add a `LockTime` type to hold the nLockTime `u32` value. Use it in
    `Transaction` for `lock_time` instead of a `u32`. Make it public so this
    new type can be used by rust-miniscript and other downstream projects.
    
    Add a `PackedLockTime` type that wraps a raw `u32` and derives `Ord`,
    this type is for wrapping a consensus lock time value for nesting in
    types that would like to derive `Ord`.
    tcharding committed Jul 26, 2022
    Copy the full SHA
    0ed78e5 View commit details
    Browse the repository at this point in the history