@@ -109,7 +109,7 @@ use sp_runtime::{
109109 self , CheckEqual , AtLeast32Bit , Zero , SignedExtension , Lookup , LookupError ,
110110 SimpleBitOps , Hash , Member , MaybeDisplay , BadOrigin , SaturatedConversion ,
111111 MaybeSerialize , MaybeSerializeDeserialize , MaybeMallocSizeOf , StaticLookup , One , Bounded ,
112- Dispatchable ,
112+ Dispatchable , DispatchInfoOf , PostDispatchInfoOf ,
113113 } ,
114114} ;
115115
@@ -1183,7 +1183,7 @@ impl<T: Trait + Send + Sync> CheckWeight<T> where
11831183 ///
11841184 /// Upon successes, it returns the new block weight as a `Result`.
11851185 fn check_weight (
1186- info : & <T :: Call as Dispatchable > :: Info ,
1186+ info : & DispatchInfoOf < T :: Call > ,
11871187 ) -> Result < Weight , TransactionValidityError > {
11881188 let current_weight = Module :: < T > :: all_extrinsics_weight ( ) ;
11891189 let maximum_weight = T :: MaximumBlockWeight :: get ( ) ;
@@ -1201,7 +1201,7 @@ impl<T: Trait + Send + Sync> CheckWeight<T> where
12011201 ///
12021202 /// Upon successes, it returns the new block length as a `Result`.
12031203 fn check_block_length (
1204- info : & <T :: Call as Dispatchable > :: Info ,
1204+ info : & DispatchInfoOf < T :: Call > ,
12051205 len : usize ,
12061206 ) -> Result < u32 , TransactionValidityError > {
12071207 let current_len = Module :: < T > :: all_extrinsics_len ( ) ;
@@ -1217,7 +1217,7 @@ impl<T: Trait + Send + Sync> CheckWeight<T> where
12171217 }
12181218
12191219 /// get the priority of an extrinsic denoted by `info`.
1220- fn get_priority ( info : & <T :: Call as Dispatchable > :: Info ) -> TransactionPriority {
1220+ fn get_priority ( info : & DispatchInfoOf < T :: Call > ) -> TransactionPriority {
12211221 match info. class {
12221222 DispatchClass :: Normal => info. weight . into ( ) ,
12231223 DispatchClass :: Operational => Bounded :: max_value ( ) ,
@@ -1235,7 +1235,7 @@ impl<T: Trait + Send + Sync> CheckWeight<T> where
12351235 ///
12361236 /// It checks and notes the new weight and length.
12371237 fn do_pre_dispatch (
1238- info : & <T :: Call as Dispatchable > :: Info ,
1238+ info : & DispatchInfoOf < T :: Call > ,
12391239 len : usize ,
12401240 ) -> Result < ( ) , TransactionValidityError > {
12411241 let next_len = Self :: check_block_length ( info, len) ?;
@@ -1249,7 +1249,7 @@ impl<T: Trait + Send + Sync> CheckWeight<T> where
12491249 ///
12501250 /// It only checks that the block weight and length limit will not exceed.
12511251 fn do_validate (
1252- info : & <T :: Call as Dispatchable > :: Info ,
1252+ info : & DispatchInfoOf < T :: Call > ,
12531253 len : usize ,
12541254 ) -> TransactionValidity {
12551255 // ignore the next weight and length. If they return `Ok`, then it is below the limit.
@@ -1275,7 +1275,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckWeight<T> where
12751275 self ,
12761276 _who : & Self :: AccountId ,
12771277 _call : & Self :: Call ,
1278- info : & <Self :: Call as Dispatchable > :: Info ,
1278+ info : & DispatchInfoOf < Self :: Call > ,
12791279 len : usize ,
12801280 ) -> Result < ( ) , TransactionValidityError > {
12811281 if info. class == DispatchClass :: Mandatory {
@@ -1288,7 +1288,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckWeight<T> where
12881288 & self ,
12891289 _who : & Self :: AccountId ,
12901290 _call : & Self :: Call ,
1291- info : & <Self :: Call as Dispatchable > :: Info ,
1291+ info : & DispatchInfoOf < Self :: Call > ,
12921292 len : usize ,
12931293 ) -> TransactionValidity {
12941294 if info. class == DispatchClass :: Mandatory {
@@ -1299,24 +1299,24 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckWeight<T> where
12991299
13001300 fn pre_dispatch_unsigned (
13011301 _call : & Self :: Call ,
1302- info : & <Self :: Call as Dispatchable > :: Info ,
1302+ info : & DispatchInfoOf < Self :: Call > ,
13031303 len : usize ,
13041304 ) -> Result < ( ) , TransactionValidityError > {
13051305 Self :: do_pre_dispatch ( info, len)
13061306 }
13071307
13081308 fn validate_unsigned (
13091309 _call : & Self :: Call ,
1310- info : & <Self :: Call as Dispatchable > :: Info ,
1310+ info : & DispatchInfoOf < Self :: Call > ,
13111311 len : usize ,
13121312 ) -> TransactionValidity {
13131313 Self :: do_validate ( info, len)
13141314 }
13151315
13161316 fn post_dispatch (
13171317 _pre : Self :: Pre ,
1318- info : & <Self :: Call as Dispatchable > :: Info ,
1319- _post_info : & <Self :: Call as Dispatchable > :: PostInfo ,
1318+ info : & DispatchInfoOf < Self :: Call > ,
1319+ _post_info : & PostDispatchInfoOf < Self :: Call > ,
13201320 _len : usize ,
13211321 result : & DispatchResult ,
13221322 ) -> Result < ( ) , TransactionValidityError > {
@@ -1380,7 +1380,7 @@ impl<T: Trait> SignedExtension for CheckNonce<T> where
13801380 self ,
13811381 who : & Self :: AccountId ,
13821382 _call : & Self :: Call ,
1383- _info : & <Self :: Call as Dispatchable > :: Info ,
1383+ _info : & DispatchInfoOf < Self :: Call > ,
13841384 _len : usize ,
13851385 ) -> Result < ( ) , TransactionValidityError > {
13861386 let mut account = Account :: < T > :: get ( who) ;
@@ -1402,7 +1402,7 @@ impl<T: Trait> SignedExtension for CheckNonce<T> where
14021402 & self ,
14031403 who : & Self :: AccountId ,
14041404 _call : & Self :: Call ,
1405- info : & <Self :: Call as Dispatchable > :: Info ,
1405+ info : & DispatchInfoOf < Self :: Call > ,
14061406 _len : usize ,
14071407 ) -> TransactionValidity {
14081408 // check index
@@ -1468,7 +1468,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckEra<T> {
14681468 & self ,
14691469 _who : & Self :: AccountId ,
14701470 _call : & Self :: Call ,
1471- _info : & <Self :: Call as Dispatchable > :: Info ,
1471+ _info : & DispatchInfoOf < Self :: Call > ,
14721472 _len : usize ,
14731473 ) -> TransactionValidity {
14741474 let current_u64 = <Module < T > >:: block_number ( ) . saturated_into :: < u64 > ( ) ;
0 commit comments