Skip to content

Commit 816f6f8

Browse files
committed
Move change calculus to coin_select
The former way to compute and create change was inside `create_tx`, just after performing coin selection. It blocked the opportunity to have an "ensemble" algorithm to decide between multiple coin selection algorithms based on a metric, like Waste. Now, change isn't created inside `coin_select` but the change amount and the possibility to create change is decided inside the `coin_select` method. In this way, change is associated with the coin selection algorithm that generated it, and a method to decide between them can be implemented.
1 parent dd51380 commit 816f6f8

File tree

3 files changed

+220
-35
lines changed

3 files changed

+220
-35
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2727
- Support for `tr()` descriptors in the `descriptor!()` macro
2828
- Add support for Bitcoin Core 23.0 when using the `rpc` blockchain
2929
- Add `remove_partial_sigs` and `try_finalize` to `SignOptions`
30+
- Add `Excess` enum to handle remaining amount after coin selection.
31+
- Move change creation from `Wallet::create_tx` to `CoinSelectionAlgorithm::coin_select`.
3032

3133
## [v0.18.0] - [v0.17.0]
3234

0 commit comments

Comments
 (0)