-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The difference between ConstructNode and WitnessNode was always confusing. ConstructNode came earlier and was used mostly for decoding programs. Its witness nodes were always empty because there are no witness values during decoding. WitnessNode was added later for creating satisfied Simplicity policies. Its witness nodes were potentially filled (Option<Value>) because a witness value might exist (satisfied fragment) or not exist (unsatisfied fragment). The code base for ConstructNode and for WitnessNode is almost identical. Small changes make both identical and allow us to remove one of them. In this commit, we set <Construct as Marker>::Witness to Option<Value> and by copy over the finalization code from WitnessNode. We replace all code occurrences of `Witness*` with `Construct*`. Finally, we delete src/node/witness.rs entirely.
- Loading branch information
1 parent
03de73d
commit dfd1516
Showing
13 changed files
with
190 additions
and
376 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
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
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
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.