p2pderivatives / rust-bitcoin-coin-selection

10 stars 5 forks source link

Move txin base weight calculation #26

Closed yancyribbens closed 10 months ago

yancyribbens commented 11 months ago

Marking this as draft for now until PR https://github.com/rust-bitcoin/rust-bitcoin/pull/2206 is reviewed. If it's brought into master I'll move this PR out of draft state.

The base weight calculation was previously provided by rust-bitcoin but has since been removed. Furthermore, the removed base weight calculation had a logic error where it should have been multiplied by 4. This PR provides a local base weight calculation and uses from_vb which multiplies by 4 since the components of the base weight are not part of segwit.

yancyribbens commented 10 months ago

closing in favor of #27