Skip to content

Commit

Permalink
Fix chore
Browse files Browse the repository at this point in the history
  • Loading branch information
0xrjman committed Dec 4, 2024
1 parent a5e21d0 commit 5271077
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pallets/dummy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ pub mod pallet {
impl<T: Config> Pallet<T> {}

#[pallet::storage]
#[pallet::getter(fn migration_completed)]
pub type MigrationCompleted<T> = StorageValue<_, bool, ValueQuery>;
#[pallet::getter(fn sudo_migration_completed)]
pub type SudoMigrationCompleted<T> = StorageValue<_, bool, ValueQuery>;

#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
fn on_initialize(_n: T::BlockNumber) -> Weight {
if Self::migration_completed() {
if Self::sudo_migration_completed() {
return Weight::zero();
}

Expand Down Expand Up @@ -64,7 +64,7 @@ pub mod pallet {
}
Self::deposit_event(Event::SudoMigrated(sudo_account, amount_to_add.into()));

MigrationCompleted::<T>::put(true);
SudoMigrationCompleted::<T>::put(true);

T::DbWeight::get().reads_writes(1, 3)
}
Expand Down

0 comments on commit 5271077

Please sign in to comment.