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

Add max standard tx weight constant to transaction #1968

Conversation

yancyribbens
Copy link
Contributor

Add a constant for the max transaction weight. Similar to max block weight. This value is pulled from core here

@yancyribbens yancyribbens force-pushed the feature/add-max-transaction-weight branch from 66c0cf1 to cf172a0 Compare August 1, 2023 09:00
Comment on lines 681 to 683
/// The maximum weight for transactions we're willing to relay/mine.
pub const MAX_STANDARD_WEIGHT: Weight = Weight::from_wu(400_000);
Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

@yancyribbens yancyribbens force-pushed the feature/add-max-transaction-weight branch from cf172a0 to 2e3006a Compare August 2, 2023 10:52
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 2e3006a

Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

ACK 2e3006a

@apoelstra apoelstra merged commit caf53d7 into rust-bitcoin:master Aug 2, 2023
29 checks passed
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.

None yet

4 participants