@@ -103,7 +103,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
103103 spec_name : create_runtime_str ! ( "crust" ) ,
104104 impl_name : create_runtime_str ! ( "crustio-crust" ) ,
105105 authoring_version : 1 ,
106- spec_version : 27 ,
106+ spec_version : 28 ,
107107 impl_version : 1 ,
108108 apis : RUNTIME_API_VERSIONS ,
109109 transaction_version : 1
@@ -732,10 +732,10 @@ impl pallet_transaction_payment::Config for Runtime {
732732 TargetedFeeAdjustment < Self , TargetBlockFullness , AdjustmentVariable , MinimumMultiplier > ;
733733}
734734
735- // impl pallet_sudo::Config for Runtime {
736- // type Event = Event;
737- // type Call = Call;
738- // }
735+ impl pallet_sudo:: Config for Runtime {
736+ type Event = Event ;
737+ type Call = Call ;
738+ }
739739
740740parameter_types ! {
741741 pub const PunishmentSlots : u32 = 8 ; // 8 report slot == 8 hours
@@ -914,6 +914,9 @@ construct_runtime! {
914914 // ChainBridge
915915 ChainBridge : bridge:: { Module , Call , Storage , Event <T >} ,
916916 BridgeTransfer : bridge_transfer:: { Module , Call , Event <T >, Storage } ,
917+
918+ // reopen Sudo
919+ Sudo : pallet_sudo:: { Module , Call , Storage , Config <T >, Event <T >} ,
917920 }
918921}
919922
@@ -941,6 +944,7 @@ pub type SignedExtra = (
941944pub type UncheckedExtrinsic = generic:: UncheckedExtrinsic < Address , Call , Signature , SignedExtra > ;
942945/// Extrinsic type that has already been checked.
943946pub type CheckedExtrinsic = generic:: CheckedExtrinsic < AccountId , Index , SignedExtra > ;
947+
944948/// Executive: handles dispatch to the various modules.
945949pub type Executive = frame_executive:: Executive <
946950 Runtime ,
@@ -1113,6 +1117,23 @@ impl_runtime_apis! {
11131117 }
11141118 }
11151119
1120+ #[ cfg( feature = "try-runtime" ) ]
1121+ impl frame_try_runtime:: TryRuntime <Block > for Runtime {
1122+ fn on_runtime_upgrade( checks: frame_try_runtime:: UpgradeCheckSelect ) -> ( Weight , Weight ) {
1123+ let weight = Executive :: try_runtime_upgrade( checks) . unwrap( ) ;
1124+ ( weight, RuntimeBlockWeights :: get( ) . max_block)
1125+ }
1126+
1127+ fn execute_block(
1128+ block: Block ,
1129+ state_root_check: bool ,
1130+ signature_check: bool ,
1131+ select: frame_try_runtime:: TryStateSelect ,
1132+ ) -> Weight {
1133+ Executive :: try_execute_block( block, state_root_check, signature_check, select) . unwrap( )
1134+ }
1135+ }
1136+
11161137 impl frame_system_rpc_runtime_api:: AccountNonceApi <Block , AccountId , Index > for Runtime {
11171138 fn account_nonce( account: AccountId ) -> Index {
11181139 System :: account_nonce( account)
0 commit comments