Skip to content

fix(wallet): added the validation of UTXO data for build_fee_bump #1913

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ItshMoh
Copy link

@ItshMoh ItshMoh commented Mar 25, 2025

Description

It fixes the Issue bitcoindevkit/bdk_wallet#51 . In this PR we are checking the size of the prev_tx.output list for ensuring that it contains the output referred by each input of the transaction to be bumped.

Notes to the reviewers

here prev_tx.output size is checked. Also changed the .map form .and_then for proper handling of Result.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@ItshMoh ItshMoh changed the title fix(wallet): added the validation of UTXO data fix(wallet): added the validation of UTXO data for build_fee_bump Mar 25, 2025
@ValuedMammal ValuedMammal added the audit Suggested as result of external code audit label Mar 26, 2025
@ValuedMammal ValuedMammal moved this to Needs Review in BDK Wallet Mar 26, 2025
@ValuedMammal ValuedMammal added this to the 1.3.0 milestone Mar 26, 2025
@ItshMoh
Copy link
Author

ItshMoh commented Mar 28, 2025

Hey @ValuedMammal for This PR. Is the new error variant suitable. Or I should look for existing error variants as you have suggested with #1911 . What do you suggest?

Copy link

@aagbotemi aagbotemi left a comment

Choose a reason for hiding this comment

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

Hey @ItshMoh. you've done a great job working on this PR.

I will suggest you add some unit tests to cover your new implementation. This will help ensure that edge cases, such as validation UTXO data, are handled correctly. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit Suggested as result of external code audit
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

3 participants