bitcoindevkit / coin-select

Tool to help you select inputs for making bitcoin transactions.
Other
12 stars 6 forks source link

fix: add excess to changeless `LowestFee` score #11

Closed jp1ac4 closed 8 months ago

jp1ac4 commented 9 months ago

This is to fix the part of #6 relating to https://github.com/bitcoindevkit/bdk/pull/1072#discussion_r1393687511.

For the LowestFee metric, it adds the excess to changeless solutions instead of those with change.

LLFourn commented 9 months ago

I still think it's wrong after this. Why are we adding the lower bound thing to it. In the case of no drain the metric should just be: (cs.selected_value() - self.target.value) as f32 i.e. the fee. Then with drain it should be (input_weight + base_weight + drain_weight) * feerate.

cc @evanlinjin

LLFourn commented 8 months ago

Just noting that I've talked with @evanlinjin and I'm now in charge of fixing it.

jp1ac4 commented 8 months ago

Thanks for the update. Feel free to close this PR if you'll be opening a new one.

LLFourn commented 8 months ago

@evanlinjin can you close this PR and give me permission to manage this repo.