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:
Kian Paimani
2022-01-19 20:58:47 +01:00
committed by GitHub
parent c8c46fea96
commit 1344e43d2d
11 changed files with 28 additions and 80 deletions
+2 -3
View File
@@ -56,8 +56,7 @@ pub fn remove_deferred_storage<T: Config>() -> Weight {
#[cfg(test)]
mod test {
use super::*;
use crate::mock::{new_test_ext, with_on_offence_fractions, Offences, Runtime as T};
use frame_support::traits::OnRuntimeUpgrade;
use crate::mock::{new_test_ext, with_on_offence_fractions, Runtime as T};
use sp_runtime::Perbill;
use sp_staking::offence::OffenceDetails;
@@ -87,7 +86,7 @@ mod test {
// when
assert_eq!(
Offences::on_runtime_upgrade(),
remove_deferred_storage::<T>(),
<T as frame_system::Config>::DbWeight::get().reads_writes(1, 1),
);