From: Alekos Filini Date: Mon, 25 Apr 2022 14:45:43 +0000 (+0200) Subject: Merge bitcoindevkit/bdk#557: add OldestFirstCoinSelection X-Git-Tag: v0.19.0~15 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/enum.FileStoreError.html?a=commitdiff_plain;h=6e8744d59d07333205cd29c1df7b26892a3cfb60;p=bdk Merge bitcoindevkit/bdk#557: add OldestFirstCoinSelection 6931d0bd1f044bf73c0cb760c0eb0be19aea8de1 add private function select_sorted_utxso to be resued by multiple CoinSelection impl (KaFai Choi) 545beec743412717895d0ba5d32ccd9aac68f4a6 add OldestFirstCoinSelection (KaFai Choi) Pull request description: ### Description This PR is to add `OldestFirstCoinSelection`. See this issue for detail https://github.com/bitcoindevkit/bdk/issues/120 ### Notes to the reviewers Apologize in advance if the quality of this PR is too low.(I am newbie in both bitcoin wallet and rust). While this PR seemed very straight-forward to me in the first glance, it's actually a bit more complicated than I thought as it involves calling DB get the blockheight before sorting it. The current implementation should be pretty naive but I would like to get some opinion to see if I am heading to a right direction first before working on optimizations like ~~1. Avoiding calling DB for optional_utxos if if the amount from required_utxos are already enough.~~ Probably not worth to do such optimization to keep code simpler? ### 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 #### New Features: * [x] I've added tests for the new feature * [x] I've added docs for the new feature * [x] I've updated `CHANGELOG.md` #### Bugfixes: * [ ] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [ ] I'm linking the issue being fixed by this PR ACKs for top commit: afilini: ACK 6931d0bd1f044bf73c0cb760c0eb0be19aea8de1 Tree-SHA512: d297bbad847d99cfdd8c6b1450c3777c5d55bc51c7934f287975c4d114a21840d428a75a172bfb7eacbac95413535452b644cab971efb8c0b5caf0d06d6d8356 --- 6e8744d59d07333205cd29c1df7b26892a3cfb60 diff --cc CHANGELOG.md index 78fa1657,4e797aa0..6506d12d --- a/CHANGELOG.md +++ b/CHANGELOG.md @@@ -6,17 -6,7 +6,18 @@@ and this project adheres to [Semantic V ## [Unreleased] ++- added `OldestFirstCoinSelection` impl to `CoinSelectionAlgorithm` + + +## [v0.18.0] - [v0.17.0] + - Add `sqlite-bundled` feature for deployments that need a bundled version of sqlite, ie. for mobile platforms. +- Added `Wallet::get_signers()`, `Wallet::descriptor_checksum()` and `Wallet::get_address_validators()`, exposed the `AsDerived` trait. +- Deprecate `database::Database::flush()`, the function is only needed for the sled database on mobile, instead for mobile use the sqlite database. +- Add `keychain: KeychainKind` to `wallet::AddressInfo`. +- Improve key generation traits +- Rename `WalletExport` to `FullyNodedExport`, deprecate the former. +- Bump `miniscript` dependency version to `^6.1`. ## [v0.17.0] - [v0.16.1]