Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: treat zero value outputs as pre-defined #71

Merged
merged 2 commits into from
Jun 14, 2022

Conversation

kaladinlight
Copy link
Contributor

@kaladinlight kaladinlight commented Jun 13, 2022

Previously, outputs with a value of 0 were being treated as a split output. This change only treats outputs with a value of undefined as split outputs. This allows you to pass through a zero value script (OP_RETURN) output into the coinselect split function without it increasing the splitOutputsCount, resulting in a correct and expected result.

@junderw junderw force-pushed the master branch 3 times, most recently from 69001ce to 2f99d56 Compare June 13, 2022 23:02
@junderw
Copy link
Member

junderw commented Jun 13, 2022

Please rebase (added Github Actions and package-lock etc.)

@kaladinlight
Copy link
Contributor Author

Please rebase (added Github Actions and package-lock etc.)

should be up to date now

@junderw junderw merged commit 2a853e3 into bitcoinjs:master Jun 14, 2022
@kaladinlight kaladinlight deleted the handle-zero-value-output-split branch June 14, 2022 00:08
@junderw
Copy link
Member

junderw commented Jun 14, 2022

published as 3.1.13

@kaladinlight
Copy link
Contributor Author

published as 3.1.13

Thanks for getting this in and published so quickly!

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.

2 participants