forked from rust-bitcoin/rust-bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor witness_version and is_witness_program
These two functions are related. We cannot, by definition, get the witness version from a script that is not a witness program but currently the code is not linking these two things. Refactor by doing: - Move the check of the witness program bip rules to `witness_version` - Call `witness_version().is_some()` in the predicate Improve the docs while we are at it to include the bip text in the rustdoc. Note I didn't bother referencing the segwit bip number, this bip text is pretty well known.
- Loading branch information
Showing
1 changed file
with
28 additions
and
18 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