-
Notifications
You must be signed in to change notification settings - Fork 621
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #2549: improve relative locktime API
04715e3 absolute: make is_* methods uniform with the ones from relative (Andrew Poelstra) 878b865 relative locktime: introduce is_* methods to check units (Andrew Poelstra) c2f87c7 relative locktime: add is_implied_by method for sequences (Andrew Poelstra) 319e102 relative locktime: use From/TryFrom to convert between relative locktimes and Sequence (Andrew Poelstra) 0ed2691 relative locktime: add conversions to/from sequence (Andrew Poelstra) 5c8fb5c relative locktime: add consensus encode/decode functions (Andrew Poelstra) ac968e0 relative locktime: constify a bunch of constructors (Andrew Poelstra) f27e675 relative locktime: add "obvious" constructors (Andrew Poelstra) f02b1da relative locktime: copy comments and PartialOrd impl from absolute locktimes (Andrew Poelstra) 2ff5085 locktimes: run cargo fmt (Andrew Poelstra) Pull request description: While implementing rust-bitcoin/rust-miniscript#654 I ran into a number of limitations of the `relative::LockTime` API. This fixes these by * Copying a ton of functions from `absolute::LockTime` to `relative::LockTime`, adjusting comments and functionality accordingly. * Adding conversion functions to/from `Sequence` numbers, as well as a method to check whether a locktime is satisfied by a given sequence number. Fixes #2547 Fixes #2545 Fixes #2540 ACKs for top commit: tcharding: ACK 04715e3 sanket1729: ACK 04715e3 Tree-SHA512: 70740eaa3a83dc1e7312b99e907ccdcef4eeb6191ae881d81712707ad6fb949c4e28183ab6f9258c6cde1ef8fdd5dc6476439e705a9e02a939b7832430a608d4
- Loading branch information
Showing
4 changed files
with
284 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.