mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +00:00
Remove all stale on_runtime_upgrade hooks in the runtime (#10650)
* Remove all stale on_runtime_upgrade hooks in the runtime * add docs * cleanup * fix warn * fix more warnings * fix offence test * overwrite the damn UItest
This commit is contained in:
@@ -39,9 +39,9 @@ mod impls;
|
||||
pub use impls::*;
|
||||
|
||||
use crate::{
|
||||
log, migrations, slashing, weights::WeightInfo, ActiveEraInfo, BalanceOf, EraPayout,
|
||||
EraRewardPoints, Exposure, Forcing, NegativeImbalanceOf, Nominations, PositiveImbalanceOf,
|
||||
Releases, RewardDestination, SessionInterface, StakingLedger, UnappliedSlash, UnlockChunk,
|
||||
log, slashing, weights::WeightInfo, ActiveEraInfo, BalanceOf, EraPayout, EraRewardPoints,
|
||||
Exposure, Forcing, NegativeImbalanceOf, Nominations, PositiveImbalanceOf, Releases,
|
||||
RewardDestination, SessionInterface, StakingLedger, UnappliedSlash, UnlockChunk,
|
||||
ValidatorPrefs,
|
||||
};
|
||||
|
||||
@@ -660,23 +660,6 @@ pub mod pallet {
|
||||
|
||||
#[pallet::hooks]
|
||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
if StorageVersion::<T>::get() == Releases::V6_0_0 {
|
||||
migrations::v7::migrate::<T>()
|
||||
} else {
|
||||
T::DbWeight::get().reads(1)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<(), &'static str> {
|
||||
if StorageVersion::<T>::get() == Releases::V6_0_0 {
|
||||
migrations::v7::pre_migrate::<T>()
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn on_initialize(_now: BlockNumberFor<T>) -> Weight {
|
||||
// just return the weight of the on_finalize.
|
||||
T::DbWeight::get().reads(1)
|
||||
|
||||
Reference in New Issue
Block a user