Feature/v3#42
Open
ulrichard wants to merge 5 commits into
Open
Conversation
c2a4c7b to
c4b075f
Compare
Comment on lines
+216
to
+217
| if psbt.inputs.len() != 1 && psbt.unsigned_tx.output.len() != 1 { | ||
| return Err(ProofError::WrongNumberOfOutputs); |
Member
There was a problem hiding this comment.
Shouldn't this be an error if the psbt.outputs.len() OR the psbt.unsigned_tx.output.len() is wrong?
Suggested change
| if psbt.inputs.len() != 1 && psbt.unsigned_tx.output.len() != 1 { | |
| return Err(ProofError::WrongNumberOfOutputs); | |
| if psbt.outputs.len() != 1 || psbt.unsigned_tx.output.len() != 1 { | |
| return Err(ProofError::WrongNumberOfOutputs); |
Comment on lines
+219
to
+221
| if psbt.unsigned_tx.input.len() <= 1 && psbt.inputs.len() <= 1 { | ||
| return Err(ProofError::WrongNumberOfInputs); | ||
| } |
Member
There was a problem hiding this comment.
Same question as above, shouldn't either one of these being wrong cause the error? Also I changed the order so it matches above check to make it easier to read.
Suggested change
| if psbt.unsigned_tx.input.len() <= 1 && psbt.inputs.len() <= 1 { | |
| return Err(ProofError::WrongNumberOfInputs); | |
| } | |
| if psbt.inputs.len() <= 1 || psbt.unsigned_tx.input.len() <= 1 { | |
| return Err(ProofError::WrongNumberOfInputs); | |
| } |
Collaborator
Author
There was a problem hiding this comment.
yes, you are right about the checks.
I didn't even remember them. I added them with a commit for the v1.0 release.
When this is merged, the other PRs can be closed, as they are on top of each other.
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.
upgrading to bdk_wallet v3.0