From: 志宇 Date: Thu, 20 Jun 2024 04:40:24 +0000 (+0800) Subject: Merge bitcoindevkit/bdk#1476: fix(wallet)!: Simplify `SignOptions` and improve finali... X-Git-Tag: v1.0.0-beta.1~15 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.CommandStringError.html?a=commitdiff_plain;h=e406675f43422da14267a16326d429a53369fb52;p=bdk Merge bitcoindevkit/bdk#1476: fix(wallet)!: Simplify `SignOptions` and improve finalization logic 996605f2bf9440dd42647123a127c038253f0247 fix(wallet)!: Simplify `SignOptions` and improve finalization logic (valued mammal) Pull request description: Rather than comingle various `SignOptions` with the finalization step, we simply clear all fields when finalizing as per the PSBT spec in BIPs 174 and 371 which is more in line with user expectations. ### Notes to the reviewers I chose to re-implement some parts of [`finalize_input`](https://docs.rs/miniscript/latest/src/miniscript/psbt/finalizer.rs.html#434) since it's fairly straightforward, see also https://github.com/bitcoindevkit/bdk/issues/1461#issuecomment-2171983426. I had to refactor some wallet tests but didn't go out of my way to add additional tests. closes #1461 ### Changelog notice - Removed field `remove_partial_sigs` from `SignOptions` - Removed field `remove_taproot_extras` from `SignOptions` ### 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 #### Bugfixes: * [x] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [x] I'm linking the issue being fixed by this PR ACKs for top commit: evanlinjin: re-ACK 996605f2bf9440dd42647123a127c038253f0247 Tree-SHA512: 63e78e75c22031424e87fcc26cd6b0015c626cd57c02680256bad9d1783cef71f4048b2d7ce5d0425cd4239351e37dd0e2a626dda7e8417af7fc52cb0afe6933 --- e406675f43422da14267a16326d429a53369fb52