This repository was archived by the owner on Nov 15, 2023. It is now read-only.
WeightMeter: more consistent naming#14586
Merged
paritytech-processbot[bot] merged 11 commits intomasterfrom Jul 18, 2023
Merged
WeightMeter: more consistent naming#14586paritytech-processbot[bot] merged 11 commits intomasterfrom
WeightMeter: more consistent naming#14586paritytech-processbot[bot] merged 11 commits intomasterfrom
Conversation
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
This was referenced Aug 24, 2023
WeightMeter: more consistent namingWeightMeter: more consistent naming
WeightMeter: more consistent namingWeightMeter: more consistent naming
juangirini
approved these changes
Jul 17, 2023
|
|
||
| /// Consume some weight and defensively fail if it is over the limit. Saturate in any case. | ||
| /// | ||
| /// This is provided as a less noisy version of `defensive_saturating_accrue`. |
Contributor
There was a problem hiding this comment.
The meaning of a "less noisy version" is not clear to me. I mean, defensive_saturating_accrue is just an alias now. Maybe we can just remove this line.
Member
Author
There was a problem hiding this comment.
Yea I copied if from the Gist from Gav - but agreed; it is unnecessary to mention now.
bkchr
approved these changes
Jul 17, 2023
Member
bkchr
left a comment
There was a problem hiding this comment.
The new naming is soo much better. ❤️
bkchr
reviewed
Jul 17, 2023
Co-authored-by: Juan <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
ggwpez
commented
Jul 18, 2023
Member
Author
|
bot merge |
nathanwhit
pushed a commit
to nathanwhit/substrate
that referenced
this pull request
Jul 19, 2023
* Rename WeightMeter functions * Fixes Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fixup and doc + tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> * One more test Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fixup pallets Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Use correct function 🤦 Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Apply suggestions from code review Co-authored-by: Juan <[email protected]> * Update primitives/weights/src/weight_meter.rs Co-authored-by: Bastian Köcher <[email protected]> * Update primitives/weights/src/weight_meter.rs Co-authored-by: Bastian Köcher <[email protected]> * Update primitives/weights/src/weight_meter.rs --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Juan <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
Ank4n
pushed a commit
that referenced
this pull request
Jul 22, 2023
* Rename WeightMeter functions * Fixes Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fixup and doc + tests Signed-off-by: Oliver Tale-Yazdi <[email protected]> * One more test Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Fixup pallets Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Use correct function 🤦 Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Apply suggestions from code review Co-authored-by: Juan <[email protected]> * Update primitives/weights/src/weight_meter.rs Co-authored-by: Bastian Köcher <[email protected]> * Update primitives/weights/src/weight_meter.rs Co-authored-by: Bastian Köcher <[email protected]> * Update primitives/weights/src/weight_meter.rs --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Juan <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@gavofyork recommended some more consistent naming for the
WeightMeter. Breaking changes are prefixed with 🚨Changes:
defensive_saturating_accrueand introduceconsumeinstead.check_accrueand introducetry_consumeinstead.can_accrueand introducecan_consumeinstead.consumedandlimitand addconsumed()andlimit()getters instead.Polkadot Companion: paritytech/polkadot#7507