-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core/weighting): remove optional and define correct rounding for …
…usize::MAX (#5490) Description --- make features_and_scripts_byte_per_gram mandatory and update the weighting code Motivation and Context --- The optional features_and_scripts_bytes_per_gram was previously optional to keep compatibility with a previous block/tx weighting calculation which did not account for metadata bytes (i.e. features_and_scripts_bytes_per_gram is None). This is no longer needed. How Has This Been Tested? --- Existing tests, updated a unit test What process can a PR reviewer use to test or verify this change? --- Mine blocks containing transactions <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Breaking Changes --- - [x] None (assuming no existing transaction metadata is big enough to exceed usize::MAX) - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain -->
- Loading branch information
Showing
2 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters