Skip to content

Commit

Permalink
Clear runtime upgrade codes (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
ark930 authored Oct 17, 2021
1 parent 5986aa5 commit 2e7db6c
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions pallets/vesting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,7 @@ pub mod pallet {
}

#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
if !VestingStartAt::<T>::exists() {
let now = <frame_system::Pallet<T>>::block_number();
VestingStartAt::<T>::put(now);
T::DbWeight::get().reads_writes(1, 1)
} else {
0
}
}
}
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}

#[pallet::call]
impl<T: Config> Pallet<T> {
Expand Down

0 comments on commit 2e7db6c

Please sign in to comment.