-
Notifications
You must be signed in to change notification settings - Fork 411
Add remove_partial_sigs and try_finalize to SignOptions #621
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 remove_partial_sigs and try_finalize to SignOptions #621
Conversation
47642ff to
4bbb9ac
Compare
4bbb9ac to
e272a14
Compare
|
I agree |
danielabrozzoni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK, the code looks good!
I have a couple of comments.
I agree that the current names are a bit confusing, I really like Steve's try_finalize/remove_partial_sigs suggestion :)
src/wallet/signer.rs
Outdated
| /// what its value is | ||
| /// | ||
| /// Defaults to `false` which will only allow signing using `SIGHASH_ALL`. | ||
| /// Defaults to `false` which will remove partial_sigs after input is signed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you've accidentally modified allow_all_sighashes docs...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦my bad
e272a14 to
09d4bc6
Compare
c018a7a to
c324eb1
Compare
rajarshimaitra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK c324eb1
Just few nits..
src/wallet/mod.rs
Outdated
| // remove finalized input partial_sigs if remove_partial_sigs is set as true in SignOptions | ||
| // do not remove finalized input partial_sigs if remove_partial_sigs is set as false in SignOptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this comment is redundant.. It self evident from the statement below what its trying to do.
src/wallet/signer.rs
Outdated
| /// Whether partial_sigs in input should be removed when the psbt inputs are signed in finalizing psbt. | ||
| /// | ||
| /// Defaults to `true` which will remove partial_sigs in inputs after signing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small doc nit. This sentences can be simplified a little.
| /// Whether partial_sigs in input should be removed when the psbt inputs are signed in finalizing psbt. | |
| /// | |
| /// Defaults to `true` which will remove partial_sigs in inputs after signing. | |
| /// Whether to remove partial_sigs from psbt inputs while finalizing psbt. | |
| /// | |
| /// Defaults to `true` which will remove partial_sigs after finalizing. |
726a14d to
be8c9dc
Compare
rajarshimaitra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK be8c9dc
All looks good to me.. Just one minor nit..
CHANGELOG.md
Outdated
| - Signing Taproot PSBTs (key spend and script spend) | ||
| - Support for `tr()` descriptors in the `descriptor!()` macro | ||
| - Add support for Bitcoin Core 23.0 when using the `rpc` blockchain | ||
| - Added `remove_partial_sigs` and `try_finalize` to `SignOptions` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Added `remove_partial_sigs` and `try_finalize` to `SignOptions` | |
| - Add `remove_partial_sigs` and `try_finalize` to `SignOptions` |
|
Can you please rebase on master, to pick up the CI changes? :) |
46a2f4e to
5eac541
Compare
|
tACK 5eac541 |
rajarshimaitra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5eac541 to
6a79f39
Compare
Sorry for replying it previously. I saw some places using "added" so I didn't change it. But yea happy to change that if that's way we want :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for replying it previously. I saw some places using "added" so I didn't change it. But yea happy to change that if that's way we want :)
No issues, not a big deal..
ACK 6a79f39
notmandatory
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 6a79f39
6a79f39 to
e3a17f6
Compare
notmandatory
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReACK e3a17f6
|
I noticed the CHANGELOG message ended up in the wrong place, I'll fix it in the release branch. |
Description
This PR is to add 2 keys(
try_finalizeandremove_partial_sigs) inSignOptions. See this issue for detail #612Notes to the reviewers
I found the negative naming of these 2 new keysdo_not_finalizeanddo_not_remove_partial_sigsare a bit confusing(like most negative named paremeter/variable). Should we actually change it back to positive naming(do_finalizeanddo_remove_partial_sigs)?Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
CHANGELOG.mdBugfixes: