mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 19:31:02 +00:00
Relocate weight to paint + decouple from extensions (#4124)
* Fisr migrated version of weight to paint * Bump * Minor nits * Some review fixes. * Line width * Revert spec bump * Fix build * Update lock file * Update palette/executive/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update palette/membership/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -114,7 +114,6 @@ use codec::{Codec, Encode, Decode};
|
||||
use runtime_io::hashing::blake2_256;
|
||||
use sr_primitives::{
|
||||
traits::{Hash, StaticLookup, Zero, MaybeSerializeDeserialize, Member, SignedExtension},
|
||||
weights::DispatchInfo,
|
||||
transaction_validity::{
|
||||
ValidTransaction, InvalidTransaction, TransactionValidity, TransactionValidityError,
|
||||
},
|
||||
@@ -123,7 +122,8 @@ use sr_primitives::{
|
||||
use support::dispatch::{Result, Dispatchable};
|
||||
use support::{
|
||||
Parameter, decl_module, decl_event, decl_storage, storage::child,
|
||||
parameter_types, IsSubType
|
||||
parameter_types, IsSubType,
|
||||
weights::DispatchInfo,
|
||||
};
|
||||
use support::traits::{OnFreeBalanceZero, OnUnbalanced, Currency, Get, Time, Randomness};
|
||||
use system::{ensure_signed, RawOrigin, ensure_root};
|
||||
@@ -1034,6 +1034,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckBlockGasLimit<T> {
|
||||
type AccountId = T::AccountId;
|
||||
type Call = <T as Trait>::Call;
|
||||
type AdditionalSigned = ();
|
||||
type DispatchInfo = DispatchInfo;
|
||||
type Pre = ();
|
||||
|
||||
fn additional_signed(&self) -> rstd::result::Result<(), TransactionValidityError> { Ok(()) }
|
||||
@@ -1042,7 +1043,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckBlockGasLimit<T> {
|
||||
&self,
|
||||
_: &Self::AccountId,
|
||||
call: &Self::Call,
|
||||
_: DispatchInfo,
|
||||
_: Self::DispatchInfo,
|
||||
_: usize,
|
||||
) -> TransactionValidity {
|
||||
let call = match call.is_sub_type() {
|
||||
|
||||
@@ -30,12 +30,12 @@ use codec::{Decode, Encode, KeyedVec};
|
||||
use sr_primitives::{
|
||||
Perbill, BuildStorage, transaction_validity::{InvalidTransaction, ValidTransaction},
|
||||
traits::{BlakeTwo256, Hash, IdentityLookup, SignedExtension},
|
||||
weights::{DispatchInfo, DispatchClass},
|
||||
testing::{Digest, DigestItem, Header, UintAuthorityId, H256},
|
||||
};
|
||||
use support::{
|
||||
assert_ok, assert_err, impl_outer_dispatch, impl_outer_event, impl_outer_origin, parameter_types,
|
||||
storage::child, StorageMap, StorageValue, traits::{Currency, Get},
|
||||
weights::{DispatchInfo, DispatchClass},
|
||||
};
|
||||
use std::{cell::RefCell, sync::atomic::{AtomicUsize, Ordering}};
|
||||
use primitives::storage::well_known_keys;
|
||||
|
||||
Reference in New Issue
Block a user