Skip to content

Feature/v3#42

Open
ulrichard wants to merge 5 commits into
bitcoindevkit:mainfrom
AminaBank:feature/v3
Open

Feature/v3#42
ulrichard wants to merge 5 commits into
bitcoindevkit:mainfrom
AminaBank:feature/v3

Conversation

@ulrichard
Copy link
Copy Markdown
Collaborator

upgrading to bdk_wallet v3.0

@ulrichard ulrichard force-pushed the feature/v3 branch 5 times, most recently from c2a4c7b to c4b075f Compare May 19, 2026 12:22
@ulrichard ulrichard requested a review from notmandatory May 19, 2026 13:46
@ulrichard ulrichard marked this pull request as ready for review May 19, 2026 13:48
Copy link
Copy Markdown
Member

@notmandatory notmandatory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update to 3.0! Overall looks good but have one question about the new error checks.

Sorry I haven't gotten the prior version bumps reviewed, after this PR goes in do you need #40 and #41 reviewed or can close them?

Comment thread src/reserves.rs Outdated
Comment on lines +216 to +217
if psbt.inputs.len() != 1 && psbt.unsigned_tx.output.len() != 1 {
return Err(ProofError::WrongNumberOfOutputs);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread src/reserves.rs Outdated
Comment on lines +219 to +221
if psbt.unsigned_tx.input.len() <= 1 && psbt.inputs.len() <= 1 {
return Err(ProofError::WrongNumberOfInputs);
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants