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
Add max standard tx weight constant to transaction #1968
Add max standard tx weight constant to transaction #1968
Conversation
66c0cf1
to
cf172a0
Compare
bitcoin/src/blockdata/transaction.rs
Outdated
/// The maximum weight for transactions we're willing to relay/mine. | ||
pub const MAX_STANDARD_WEIGHT: Weight = Weight::from_wu(400_000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a link to the line of code in Core in the docs here please so devs can quickly jump to it in future. Also the docs shouldn't be the same as Core's because rust-bitcoin
is not Core, "we" don't relay or mine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As these rules are subject to change, ideally we want also want to say "as of bitcoin core 25.0" or something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a link to the line of code in Core in the docs here please so devs can quickly jump to it in future.
Sure no problem. I try to find the explanation using git blame but pasting the link directly in the code works too.
Also the docs shouldn't be the same as Core's because rust-bitcoin is not Core, "we" don't relay or mine.
As these rules are subject to change, ideally we want also want to say "as of bitcoin core 25.0" or something similar.
Updated.
cf172a0
to
2e3006a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 2e3006a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 2e3006a
Add a constant for the max transaction weight. Similar to max block weight. This value is pulled from core here