Alliance pallet: fix func name, fix migration weights (#12174)

* Alliance pallet: fix func name, fix migration weights

* update comment order
This commit is contained in:
Muharem Ismailov
2022-09-02 18:54:30 +02:00
committed by GitHub
parent 907144496e
commit a9a2fdca7b
4 changed files with 26 additions and 19 deletions
+13 -6
View File
@@ -51,22 +51,29 @@ mod v0_to_v1 {
use super::*;
pub fn migrate<T: Config<I>, I: 'static>() -> Weight {
if migration::clear_storage_prefix(
log::info!(target: LOG_TARGET, "Running migration v0_to_v1.");
let res = migration::clear_storage_prefix(
<Pallet<T, I>>::name().as_bytes(),
b"UpForKicking",
b"",
None,
None,
)
.maybe_cursor
.is_some()
{
);
log::info!(
target: LOG_TARGET,
"Cleared '{}' entries from 'UpForKicking' storage prefix",
res.unique
);
if res.maybe_cursor.is_some() {
log::error!(
target: LOG_TARGET,
"Storage prefix 'UpForKicking' is not completely cleared."
);
}
T::DbWeight::get().writes(1)
T::DbWeight::get().writes(res.unique.into())
}
}