mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 01:57:56 +00:00
Migrate pallet-session to the new pallet macro (#9796)
* Migrate pallet-session to the new pallet macro Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Remove old macros Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
@@ -30,7 +30,7 @@ use frame_support::{
|
||||
traits::{KeyOwnerProofSystem, OnInitialize},
|
||||
};
|
||||
use frame_system::RawOrigin;
|
||||
use pallet_session::{historical::Module as Historical, Module as Session, *};
|
||||
use pallet_session::{historical::Module as Historical, Pallet as Session, *};
|
||||
use pallet_staking::{
|
||||
benchmarking::create_validator_with_nominators, testing_utils::create_validators,
|
||||
RewardDestination,
|
||||
@@ -39,7 +39,7 @@ use sp_runtime::traits::{One, StaticLookup};
|
||||
|
||||
const MAX_VALIDATORS: u32 = 1000;
|
||||
|
||||
pub struct Pallet<T: Config>(pallet_session::Module<T>);
|
||||
pub struct Pallet<T: Config>(pallet_session::Pallet<T>);
|
||||
pub trait Config:
|
||||
pallet_session::Config + pallet_session::historical::Config + pallet_staking::Config
|
||||
{
|
||||
@@ -47,7 +47,7 @@ pub trait Config:
|
||||
|
||||
impl<T: Config> OnInitialize<T::BlockNumber> for Pallet<T> {
|
||||
fn on_initialize(n: T::BlockNumber) -> frame_support::weights::Weight {
|
||||
pallet_session::Module::<T>::on_initialize(n)
|
||||
pallet_session::Pallet::<T>::on_initialize(n)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user