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

feat: try to reproduce an insatiable descriptor error & improve/remove .unwrap usage #1485

Open
oleonardolima opened this issue Jun 21, 2024 · 0 comments

Comments

@oleonardolima
Copy link
Contributor

Describe the enhancement

It's a branch-out issue from both #1448 and #1468, as suggested this issue is specifically meant for trying to reproduce the expected panic! (insatiable descriptor), and fix the .unwrap() usage with appropriate approach.

Use case

Clarifies if the expected panic! ever happens, or it's a totally unexpected situation.

Additional context

@oleonardolima oleonardolima added the new feature New feature or request label Jun 21, 2024
@notmandatory notmandatory added this to BDK Jun 23, 2024
@notmandatory notmandatory moved this to Todo in BDK Jun 23, 2024
@notmandatory notmandatory added this to the 1.0.0-beta milestone Jun 23, 2024
notmandatory added a commit that referenced this issue Jun 26, 2024
438cd46 refactor(wallet)!: change WeightedUtxo to use Weight type (Leonardo Lima)

Pull request description:

  fixes #1466
  depends on #1448
  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  This PR is a follow-up on top of #1448, and should be rebased and merged after it, it uses the rust-bitcoin `Weight` type instead of the current `usize` usage.

  NOTE: ~~It also adds a new `MiniscriptError` variant, and remove the `.unwrap()` usage.~~ As suggested I'll address this on another issue #1485, trying to reproduce the error first.

  <!-- Describe the purpose of this PR, what's being adding and/or fixed -->

  ### Notes to the reviewers
  It should be ready to review after #1448 gets merged.
  <!-- In this section you can include notes directed to the reviewers, like explaining why some parts
  of the PR were done in a specific way -->

  ### Changelog notice
  - Change `WeightedUtxo` `satisfaction_weight` has been changed to use `Weight` type.
  - Change `TxBuilder` methods `add_foreign_utxo` and `add_foreign_utxo_with_sequence` to expect `Weight` as `satisfaction_weight` type.

  <!-- Notice the release manager should include in the release tag message changelog -->
  <!-- See https://keepachangelog.com/en/1.0.0/ for examples -->

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  storopoli:
    Anyways, ACK 438cd46
  notmandatory:
    ACK 438cd46

Tree-SHA512: 1998fe659833da890ce07aa746572ae24d035e636732c1a11b7828ffed48e753adb4108f42d00b7cd05e6f45831a7a9840faa26f94058fc13760497837af002f
@notmandatory notmandatory added tests and removed new feature New feature or request labels Nov 21, 2024
@notmandatory notmandatory removed this from the 1.0.0-beta milestone Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

2 participants