mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
WeightMeter: more consistent naming (#14586)
* Rename WeightMeter functions * Fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fixup and doc + tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * One more test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fixup pallets Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use correct function 🤦 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Apply suggestions from code review Co-authored-by: Juan <juangirini@gmail.com> * Update primitives/weights/src/weight_meter.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update primitives/weights/src/weight_meter.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update primitives/weights/src/weight_meter.rs --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Juan <juangirini@gmail.com> Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
committed by
GitHub
parent
1dc6610524
commit
892831e55c
@@ -66,7 +66,7 @@ where
|
||||
) -> Result<bool, ProcessMessageError> {
|
||||
let required = Weight::from_parts(REQUIRED_WEIGHT, REQUIRED_WEIGHT);
|
||||
|
||||
if meter.check_accrue(required) {
|
||||
if meter.try_consume(required).is_ok() {
|
||||
Ok(true)
|
||||
} else {
|
||||
Err(ProcessMessageError::Overweight(required))
|
||||
|
||||
Reference in New Issue
Block a user