Skip to content

Commit f40c1f8

Browse files
committed
fix: review comments
1 parent f3240f0 commit f40c1f8

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

runtime/astar/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
148148
spec_name: create_runtime_str!("astar"),
149149
impl_name: create_runtime_str!("astar"),
150150
authoring_version: 1,
151-
spec_version: 81,
151+
spec_version: 80,
152152
impl_version: 0,
153153
apis: RUNTIME_API_VERSIONS,
154154
transaction_version: 2,

runtime/shibuya/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
173173
spec_name: create_runtime_str!("shibuya"),
174174
impl_name: create_runtime_str!("shibuya"),
175175
authoring_version: 1,
176-
spec_version: 123,
176+
spec_version: 122,
177177
impl_version: 0,
178178
apis: RUNTIME_API_VERSIONS,
179179
transaction_version: 2,

runtime/shiden/src/lib.rs

+27-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
149149
spec_name: create_runtime_str!("shiden"),
150150
impl_name: create_runtime_str!("shiden"),
151151
authoring_version: 1,
152-
spec_version: 120,
152+
spec_version: 119,
153153
impl_version: 0,
154154
apis: RUNTIME_API_VERSIONS,
155155
transaction_version: 2,
@@ -1111,7 +1111,32 @@ parameter_types! {
11111111
/// All migrations that will run on the next runtime upgrade.
11121112
///
11131113
/// 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+
}
11151140

11161141
type EventRecord = frame_system::EventRecord<
11171142
<Runtime as frame_system::Config>::RuntimeEvent,

0 commit comments

Comments
 (0)