From: Steve Myers Date: Wed, 26 Jun 2024 22:34:52 +0000 (-0500) Subject: Merge bitcoindevkit/bdk#1468: feat: use `Weight` type instead of `usize` X-Git-Tag: v1.0.0-beta.1~12 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.CommandStringError.html?a=commitdiff_plain;h=5c7cc30978d793b028d00ae65567540d7770ecec;p=bdk Merge bitcoindevkit/bdk#1468: feat: use `Weight` type instead of `usize` 438cd4682d14b5f4c6c9c653c9f05ccaaecb815d refactor(wallet)!: change WeightedUtxo to use Weight type (Leonardo Lima) Pull request description: fixes #1466 depends on #1448 ### 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. ### Notes to the reviewers It should be ready to review after #1448 gets merged. ### 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. ### 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 438cd4682d14b5f4c6c9c653c9f05ccaaecb815d notmandatory: ACK 438cd4682d14b5f4c6c9c653c9f05ccaaecb815d Tree-SHA512: 1998fe659833da890ce07aa746572ae24d035e636732c1a11b7828ffed48e753adb4108f42d00b7cd05e6f45831a7a9840faa26f94058fc13760497837af002f --- 5c7cc30978d793b028d00ae65567540d7770ecec