mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 08:51:09 +00:00
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:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user