Repository navigation
Derive weight from witness for p2wsh inputs - #862
Merged
arminsabouri merged 1 commit intoJul 14, 2025
Merged
Conversation
Collaborator
Pull Request Test Coverage Report for Build 16268541609Details
💛 - Coveralls |
spacebear21
requested changes
Jul 8, 2025
arminsabouri
force-pushed
the
use-witness-for-expected-weight
branch
2 times, most recently
from
July 8, 2025 20:13
1a369a9 to
aecba17
Compare
DanGould
reviewed
Jul 8, 2025
arminsabouri
force-pushed
the
use-witness-for-expected-weight
branch
from
July 9, 2025 13:21
aecba17 to
2901576
Compare
Contributor
Author
|
@spacebear21 when ever you get a chance. Do you mind taking another look at this one? |
spacebear21
reviewed
Jul 11, 2025
spacebear21
left a comment
Collaborator
There was a problem hiding this comment.
concept ACK with code comments
| } | ||
| (Ok(weight), None) => weight, | ||
| (Err(InputWeightError::NotSupported), Some(expected_weight)) => expected_weight, | ||
| (Err(InputWeightError::NotSupported), None) => { |
Collaborator
There was a problem hiding this comment.
I think this match arm is unnecessary because the catch-all arm would have the same effect.
| ) | ||
| ); | ||
|
|
||
| // p2wsh input with witness data should be supported and should **not** use the provided expected weight |
Collaborator
There was a problem hiding this comment.
This comment looks obsolete.
arminsabouri
force-pushed
the
use-witness-for-expected-weight
branch
from
July 13, 2025 21:16
2901576 to
2a9ed21
Compare
Contributor
Author
|
Broke my own p2wsh tests with the last push. Will have to take a look at this tomorrow. |
arminsabouri
marked this pull request as draft
July 13, 2025 21:38
If witness is available for p2wsh inputs we should be using the size of the witness to get expected input weight. Doing this incidentally enables p2wsh inputs for the payjoin sender. Related issue: payjoin#659
arminsabouri
force-pushed
the
use-witness-for-expected-weight
branch
from
July 14, 2025 13:43
2a9ed21 to
343e65f
Compare
arminsabouri
marked this pull request as ready for review
July 14, 2025 13:43
This file contains hidden or 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
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.
If witness is available for p2wsh inputs we should be using the size of the witness to get expected input weight. Doing this incidentally enables p2wsh inputs for the payjoin sender.
Related issue: #659