@@ -149,7 +149,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
149
149
spec_name : create_runtime_str ! ( "shiden" ) ,
150
150
impl_name : create_runtime_str ! ( "shiden" ) ,
151
151
authoring_version : 1 ,
152
- spec_version : 120 ,
152
+ spec_version : 119 ,
153
153
impl_version : 0 ,
154
154
apis : RUNTIME_API_VERSIONS ,
155
155
transaction_version : 2 ,
@@ -1111,7 +1111,32 @@ parameter_types! {
1111
1111
/// All migrations that will run on the next runtime upgrade.
1112
1112
///
1113
1113
/// Once done, migrations should be removed from the tuple.
1114
- pub type Migrations = ( pallet_contracts:: Migration < Runtime > , ) ;
1114
+ pub type Migrations = (
1115
+ // Part of shiden-119
1116
+ frame_support:: migrations:: RemovePallet <
1117
+ DappStakingMigrationName ,
1118
+ <Runtime as frame_system:: Config >:: DbWeight ,
1119
+ > ,
1120
+ // Part of shiden-119
1121
+ RecalculationEraFix ,
1122
+ ) ;
1123
+
1124
+ use frame_support:: traits:: OnRuntimeUpgrade ;
1125
+ pub struct RecalculationEraFix ;
1126
+ impl OnRuntimeUpgrade for RecalculationEraFix {
1127
+ fn on_runtime_upgrade ( ) -> Weight {
1128
+ let first_dapp_staking_v3_era = 743 ;
1129
+
1130
+ let expected_recalculation_era =
1131
+ InflationCycleConfig :: eras_per_cycle ( ) . saturating_add ( first_dapp_staking_v3_era) ;
1132
+
1133
+ pallet_inflation:: ActiveInflationConfig :: < Runtime > :: mutate ( |config| {
1134
+ config. recalculation_era = expected_recalculation_era;
1135
+ } ) ;
1136
+
1137
+ <Runtime as frame_system:: Config >:: DbWeight :: get ( ) . reads_writes ( 1 , 1 )
1138
+ }
1139
+ }
1115
1140
1116
1141
type EventRecord = frame_system:: EventRecord <
1117
1142
<Runtime as frame_system:: Config >:: RuntimeEvent ,
0 commit comments