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

dustThreshold in finalize - different for segwit? #16

Open
karelbilek opened this issue Jul 17, 2017 · 2 comments
Open

dustThreshold in finalize - different for segwit? #16

karelbilek opened this issue Jul 17, 2017 · 2 comments

Comments

@karelbilek
Copy link
Contributor

Should dustThreshold in utils.js be different for segwit changes, or not?

@dcousens
Copy link
Contributor

Did it change in bitcoin core?

@karelbilek
Copy link
Contributor Author

karelbilek commented Jul 18, 2017

It seems so

https://github.com/bitcoin/bitcoin/blob/f90603ac6d24f5263649675d51233f1fce8b2ecd/src/policy/policy.cpp#L20

Also it is counted a little differently than it is calculated in this repo anyway.

However, dustRelayFee is not the "current fee", but it is pre-set here, as 1sat/b (and is a user option)

https://github.com/bitcoin/bitcoin/blob/08a7316c144f9f2516db8fa62400893f4358c5ae/src/policy/policy.h#L48

Dust in this repo is, however, not meant as "dust" as in "what are standard transactions", but as in "what is the minimal change that I will create", and that is defined in core in wallet.h as MIN_CHANGE as CENT = 1000000 sat, and fee or segwit is irrelevant (and is also user configurable)

see wallet.h and wallet.cpp

@dcousens dcousens self-assigned this Dec 5, 2017
@dcousens dcousens removed their assignment Dec 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants