Skip to content

Commit 46d90c4

Browse files
authored
Remove lingering runtime upgrades (#6476)
* Remove lingering runtime upgrades * remove unused warnings * remove tests
1 parent 09dcd16 commit 46d90c4

File tree

1 file changed

+3
-25
lines changed

1 file changed

+3
-25
lines changed

src/lib.rs

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,9 +1278,9 @@ decl_module! {
12781278
/// Number of eras that staked funds must remain bonded for.
12791279
const BondingDuration: EraIndex = T::BondingDuration::get();
12801280

1281-
/// Number of eras that slashes are deferred by, after computation.
1281+
/// Number of eras that slashes are deferred by, after computation.
12821282
///
1283-
/// This should be less than the bonding duration.
1283+
/// This should be less than the bonding duration.
12841284
/// Set to 0 if slashes should be applied immediately, without opportunity for
12851285
/// intervention.
12861286
const SlashDeferDuration: EraIndex = T::SlashDeferDuration::get();
@@ -1294,7 +1294,7 @@ decl_module! {
12941294
/// length of a session will be pointless.
12951295
const ElectionLookahead: T::BlockNumber = T::ElectionLookahead::get();
12961296

1297-
/// Maximum number of balancing iterations to run in the offchain submission.
1297+
/// Maximum number of balancing iterations to run in the offchain submission.
12981298
///
12991299
/// If set to 0, balance_solution will not be executed at all.
13001300
const MaxIterations: u32 = T::MaxIterations::get();
@@ -1312,28 +1312,6 @@ decl_module! {
13121312

13131313
fn deposit_event() = default;
13141314

1315-
fn on_runtime_upgrade() -> Weight {
1316-
#[allow(dead_code)]
1317-
mod inner {
1318-
pub struct Module<T>(sp_std::marker::PhantomData<T>);
1319-
frame_support::decl_storage! {
1320-
trait Store for Module<T: super::Trait> as Staking {
1321-
pub MigrateEra: Option<super::EraIndex>;
1322-
}
1323-
}
1324-
}
1325-
1326-
if let Releases::V3_0_0 = StorageVersion::get() {
1327-
StorageVersion::put(Releases::V4_0_0);
1328-
inner::MigrateEra::kill();
1329-
1330-
T::DbWeight::get().reads_writes(1, 1)
1331-
} else {
1332-
T::DbWeight::get().reads(1)
1333-
}
1334-
}
1335-
1336-
13371315
/// sets `ElectionStatus` to `Open(now)` where `now` is the block number at which the
13381316
/// election window has opened, if we are at the last session and less blocks than
13391317
/// `T::ElectionLookahead` is remaining until the next new session schedule. The offchain

0 commit comments

Comments
 (0)