WIP: `bdk_core::coin_select` integration
Description
This is just a showcase of how coin selection will look with bdk_core integration. Tests are failing badly at the moment and I still need to figure out why.
Notes to the reviewers
This is still WIP, but let me know what you think.
Changelog notice
Integrate bdk_core::coin_select module.
Checklists
All Submissions:
- [ ] I've signed all my commits
- [ ] I followed the contribution guidelines
- [ ] I ran
cargo fmtandcargo clippybefore committing
New Features:
- [ ] I've added tests for the new feature
- [ ] I've added docs for the new feature
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
---- blockchain::rpc::test::bdk_blockchain_tests::test_taproot_key_spend stdout ----
- wv satisfaction weight: 65
pool: [(0, WeightedValue { value: 50000, weight: 225, input_count: 1, is_segwit: true })]
selected: index=0, value=50000
create_tx: weight=563, fee=141, feerate=0.25044405sats/wu
create_tx: feerate=1.0017762sats/vb
thread 'blockchain::rpc::test::bdk_blockchain_tests::test_taproot_key_spend' panicked at 'called `Result::unwrap()` on an `Err` value: Rpc(JsonRpc(Rpc(RpcError { code: -26, message: "min relay fee not met, 141 < 142", data: None })))', src/blockchain/rpc.rs:886:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
blockchain::rpc::test::bdk_blockchain_tests::test_taproot_key_spend
Something is still off with weight calculations. Is this a problem with bdk_core or miniscript?
Update: Held up by bugs in miniscript. Await upgrade to miniscript 8.0.0 (https://github.com/bitcoindevkit/bdk/pull/770).
@evanlinjin is the PR ready to be revived now that rust-miniscript 0.8.0 (and 0.9.0) is released? I noticed it as a dependency to close LLFourn/bdk_core_staging#36.
I will close this as @LLFourn has reworked the bdk chain's coin selector so this is no longer relevant.