File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
207207 // `spec_version`, and `authoring_version` are the same between Wasm and native.
208208 // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
209209 // the compatible custom types.
210- spec_version : 264 ,
210+ spec_version : 265 ,
211211 impl_version : 1 ,
212212 apis : RUNTIME_API_VERSIONS ,
213213 transaction_version : 1 ,
@@ -1596,6 +1596,14 @@ impl_runtime_apis! {
15961596 tx: <Block as BlockT >:: Extrinsic ,
15971597 block_hash: <Block as BlockT >:: Hash ,
15981598 ) -> TransactionValidity {
1599+ use codec:: DecodeLimit ;
1600+ use frame_support:: pallet_prelude:: { InvalidTransaction , TransactionValidityError } ;
1601+ use frame_support:: traits:: ExtrinsicCall ;
1602+ let encoded = tx. call( ) . encode( ) ;
1603+ if RuntimeCall :: decode_all_with_depth_limit( 8 , & mut encoded. as_slice( ) ) . is_err( ) {
1604+ log:: warn!( "failed to decode with depth limit of 8" ) ;
1605+ return Err ( TransactionValidityError :: Invalid ( InvalidTransaction :: Call ) ) ;
1606+ }
15991607 Executive :: validate_transaction( source, tx, block_hash)
16001608 }
16011609 }
You can’t perform that action at this time.
0 commit comments