Skip to content

draft: use SRD coin-selection - #70

Closed
yancyribbens wants to merge 2 commits into
kernel-node:masterfrom
yancyribbens:0619-use-srd-coin-selection
Closed

draft: use SRD coin-selection#70
yancyribbens wants to merge 2 commits into
kernel-node:masterfrom
yancyribbens:0619-use-srd-coin-selection

Conversation

@yancyribbens

Copy link
Copy Markdown
Contributor

I wanted to draft this instead of #68

Uses SRD which doesn't require knowledge of long_term_fee_rate or cost_of_change and is suitable for testing. Can follow up with another PR to add BnB and CoinGrinder once we have more parameters.

If this looks ok, will do some cleanup and remove from draft state.

@yancyribbens
yancyribbens force-pushed the 0619-use-srd-coin-selection branch from 8f149f3 to fe3f7a0 Compare June 22, 2026 12:56
CHANGE_LOWER is a bitcoin-core invariant that says do not make a change
output for anything bellow this amount.
@yancyribbens
yancyribbens force-pushed the 0619-use-srd-coin-selection branch from fe3f7a0 to ffc625b Compare June 22, 2026 12:58
@yancyribbens

Copy link
Copy Markdown
Contributor Author

rebased

@yancyribbens

Copy link
Copy Markdown
Contributor Author

let use #74 instead

@yancyribbens

Copy link
Copy Markdown
Contributor Author

Started working on some updates to coin-selection to make it more ergonomic. Hopefully you guys don't mind, but I borrowed your naming convention of Spendable as the trait interface name: p2pderivatives/rust-bitcoin-coin-selection#279. The noun Spendable works much better than what I was using before (WeightedUtxo) I think. Then consumers would impl like:

impl Spendable for Coin<'_> {
    fn total_weight(&self) -> Weight {}
    fn value(&self) -> Amount {}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant