From: Steve Myers Date: Mon, 23 Dec 2024 19:56:03 +0000 (-0600) Subject: Merge bitcoindevkit/bdk#1768: refactor(wallet): cleanup and remove unused code in... X-Git-Tag: bitcoind_rpc-0.18.0~15 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/struct.InvalidCharacterError.html?a=commitdiff_plain;h=4a3675fc8729dab76619d882f46264033492eed3;p=bdk Merge bitcoindevkit/bdk#1768: refactor(wallet): cleanup and remove unused code in create_tx a2f7a8be149e4a420519dbe072927faeb7f92514 refactor(wallet): cleanup and remove unused code in create_tx (Steve Myers) Pull request description: ### Description Cleanup and remove unused code in `Wallet::create_tx`, this was noticed during review of #1763. See: https://github.com/bitcoindevkit/bdk/pull/1763#discussion_r1876740140 fixes #1710 ### Notes to the reviewers In addition to removing the unneeded assignments to `fee_amount` and `received` I also refactored creation of the change output to be an `if let` instead of `match` statement since it only needs to do something if there is `Excess::Change`. I should have done this cleanup as part of #1048. ### Changelog notice None, only internal cleanup. ### 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: ValuedMammal: reACK a2f7a8be Tree-SHA512: 64e5895ff3dc11f71c48b6c436d5c812504d0a24e92f1fdf451936f372d95ccdd8d89e5ac634a041bdee0a4836182f05127864ed744d560c9f8ec560e092c559 --- 4a3675fc8729dab76619d882f46264033492eed3