You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #265: Prefer Utxo::Local over Utxo::Foreign in OldestFirstCoinSelection
345cc6e fix(coin_selection): prefer Utxo::Local over Utxo::Foreign in OldestFirstCoinSelection (nymius)
Pull request description:
### Description
The comments in the `OldestFirstCoinSelection` implementation stated the following:
> // For utxo that doesn't exist in DB, they will have lowest priority to be selected
But this was not honored in the code.
This PR enforces this and ensures the expected behaviour through the two following new tests:
- `test_oldest_first_coin_selection_uses_all_optional_with_foreign_utxo_locals_sorted_first`
- `test_oldest_first_coin_selection_uses_only_all_optional_local_utxos_not_a_single_foreign`
Fixes#264
### Changelog notice
No public APIs are changed by these commits.
### Checklists
> [!IMPORTANT]
> This pull request **DOES NOT** break the existing API
* [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 +nightly fmt` and `cargo clippy` before committing
* [x] I've added tests for the new code
* [x] I've expanded docs addressing new code
* [x] 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:
ValuedMammal:
ACK 345cc6e
oleonardolima:
ACK 345cc6e
Tree-SHA512: 8a538e0765ca55f870fcbc33e4c865656e9074765a5bb13c370afe2626dbf3ecbb71e8a372607e1e405a9e35f26418bfdd9c71fec018999858a5fe5680af866b
0 commit comments