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

doc: add dustThreshold explain of P2SH & P2TR #30023

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jasonandjay
Copy link

The calculation of dust in Bitcoin has different values for different payment types.
For non-Witness: (148 + vout size)*rate
For Witness: (67+vout size)*rate

According to our calculation logic, our common P2PKH is 546, P2SH is 540, the minimum value of Witness is P2WPKH is 294, and P2TR is 330

However, the comments only mentioned P2PKH’s 546 and P2WPKH’s 294, which is inconsistent with the code logic.

These four payment types are very common in BTC wallets, so I think it is necessary to update the comments

@DrahtBot
Copy link
Contributor

DrahtBot commented May 2, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

@DrahtBot DrahtBot added the Docs label May 2, 2024
@jasonandjay jasonandjay changed the title doc: add dustThreshold explain of P2SH doc: add dustThreshold explain of P2SH & P2TR May 2, 2024
Copy link
Member

@glozow glozow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your interest in contributing, but this comment doesn't reflect what the code does (also see #22779 which is linked in a comment in the code). I think this could just be confusing?

@bitcoin bitcoin deleted a comment May 2, 2024
@jasonandjay
Copy link
Author

Thanks for your interest in contributing, but this comment doesn't reflect what the code does (also see #22779 which is linked in a comment in the code). I think this could just be confusing?

I checked #22779

Which part do you think is more confusing?

I think comments should be consistent with the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants