-
Notifications
You must be signed in to change notification settings - Fork 7
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
Import finalizer logic from miniscript #5
Merged
Merged
Conversation
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
tcharding
force-pushed
the
import-finalizer
branch
from
November 14, 2023 21:17
1ad9e5b
to
a9bf728
Compare
tcharding
force-pushed
the
import-finalizer
branch
from
November 15, 2023 03:32
a9bf728
to
3586c75
Compare
tcharding
force-pushed
the
import-finalizer
branch
from
November 20, 2023 22:35
3809400
to
b29e910
Compare
Import the `psbt` module from `rust-miniscript` while tip of master was: a280447 Merge rust-bitcoin/rust-miniscript#617: Improve `TapTree` API Only do changes required to get things building, however this includes upgrade of the bitcoin dependency. Feature gate the miniscript stuff because we want this crate to be a drop in replacement for the `psbt` module in `rust-bitcoin`, users may not want to have `rust-miniscript` in there dependency tree.
Clippy emits: warning: this expression creates a reference which is immediately dereferenced by the compiler Remove reference.
Run `cargo +nightly fmt`, no other manual changes.
There is a whole bunch of error code, move it to a newly created submodule. Code move only, no logic changes.
Now that the `Psbt` type is defined in the same crate as the `miniscript` extension traits we can implement them directly instead of by way of extension traits. Refactor only, no logic changes.
Refactor the import statements using the same coding conventions we use in `rust-bitcoin`. Refactor only, no logic changes.
Move the `PsbtInputSatisfier` to a newly create `satisfy` submodule and re-export the type from the original module. Code move only, no logic changes.
Code is [subjectively] easier to read if important things come first. The `sanity_check` is a private helper function, put it down the bottom of the file. Code move only, no logic changes.
We do not need to be so explicit, the lifetime identifier `'a` is perfectly descriptive.
We only need to use path qualifiers when more context is needed.
Re-order the `miniscript` `Psbt` pubic functions putting the common case first. 1. finalize 2. finalize_mut 3. finalize_mall 4. finalize_mall_mut The diff looks complicated but this patch is code move only.
The majority of the functions in the `finalizer` module take a `Psbt` as the first paramater, this means they can be implemented as methods on `Psbt`. The remaining functions can be moved as well and made private to the `miniscript` module.
Currently we have lots of logic for implementing the Extrator role. To make this clear pull the logic out into separate modules and explicitly mark it as WIP.
tcharding
force-pushed
the
import-finalizer
branch
from
November 23, 2023 03:42
b29e910
to
9bd31ec
Compare
Only change was to use the newly released version of EDIT: Added a patch to fix the docs build. All the docs need going over anyways so its just rough. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Import the
psbt
module fromrust-miniscript
while tip of master was ata280447
. Then go wild refactoring the miniscript stuff.