Skip to content
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

fix(wallet): fix SingleRandomDraw to error if insufficient funds #1605

Merged

Conversation

notmandatory
Copy link
Member

Description

Notes to the reviewers

Since the single random draw algo can be used on its own it needs to be able to return an insufficient funds error. I think the reason we didn't catch this before is that single random draw already check for sufficient required + optional utxo amounts and returns the insufficient funds error.

Changelog notice

  • fix SingleRandomDraw coin selection to error if there are insufficient funds for a requested payment amount.

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

…unds

* fixed spelling and clippy errors
* updated tests to check for error variant instead of a panic
@notmandatory notmandatory self-assigned this Sep 12, 2024
@notmandatory notmandatory added the bug Something isn't working label Sep 12, 2024
@notmandatory notmandatory added this to the 1.0.0-beta milestone Sep 12, 2024
Copy link
Contributor

@ValuedMammal ValuedMammal left a comment

Choose a reason for hiding this comment

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

ACK 22a2f83

@notmandatory notmandatory merged commit 45f7508 into bitcoindevkit:master Sep 12, 2024
21 checks passed
This was referenced Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants