mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
Correct arithmetical semantic of PerDispatchClass (#13194)
* Fix PerDispatchClass arithmetic Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Test PerDispatchClass arithmetic Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add helpers for Weight Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove stale doc Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Dont mention Polkadot in Substrate Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove saturating_ prefix Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix usage Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
702963fea4
commit
9601b479e4
@@ -1321,7 +1321,7 @@ impl<T: Config> Pallet<T> {
|
||||
/// Another potential use-case could be for the `on_initialize` and `on_finalize` hooks.
|
||||
pub fn register_extra_weight_unchecked(weight: Weight, class: DispatchClass) {
|
||||
BlockWeight::<T>::mutate(|current_weight| {
|
||||
current_weight.add(weight, class);
|
||||
current_weight.accrue(weight, class);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user