mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Remove Ord impl for Weights V2 and add comparison fns (#12183)
* Remove Ord impl for Weights V2 and add comparison fns * Remove TODO * Update frame/multisig/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/election-provider-multi-phase/src/unsigned.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove unused import * cargo fmt * Fix tests * Fix more tests * cargo fmt * Fix more tests * Update frame/contracts/src/wasm/mod.rs Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Update weight benchmarking templates Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
@@ -563,7 +563,10 @@ impl<T: Config> Pallet<T> {
|
||||
|
||||
if let Some((call, call_len)) = maybe_approved_call {
|
||||
// verify weight
|
||||
ensure!(call.get_dispatch_info().weight <= max_weight, Error::<T>::MaxWeightTooLow);
|
||||
ensure!(
|
||||
call.get_dispatch_info().weight.all_lte(max_weight),
|
||||
Error::<T>::MaxWeightTooLow
|
||||
);
|
||||
|
||||
// Clean up storage before executing call to avoid an possibility of reentrancy
|
||||
// attack.
|
||||
|
||||
Reference in New Issue
Block a user