mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 22:51:13 +00:00
update Substrate/Polkadot/Cumulus refs (#1562)
* update Substrate/Polkadot/Cumulus refs * finality-grandpa 0.16 * fix miillau-runtime compilation * fix rialto runtime compilation * fixed rialto-parachain runtime compilation * backport GRANDPA test fixes * helper instead of removed record_all_keys * substrate-relay is compiling * millau-bridge-node at least compiles * rialto-bridge-node at least compiles * rialto-parachain-collator compiles * fixings tests (wip) * fmt * fixed BEEFY alert * clippy * removed unused dep * -extra var * move Leaf to mod mmr * fix benchmarks
This commit is contained in:
committed by
Bastian Köcher
parent
ad38cdb873
commit
95c30c780c
@@ -19,6 +19,7 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use frame_support::traits::{ValidatorSet, ValidatorSetWithIdentification};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
pub use pallet::*;
|
||||
@@ -49,6 +50,24 @@ pub mod pallet {
|
||||
pub(super) type InitialValidators<T: Config> = StorageValue<_, Vec<T::ValidatorId>>;
|
||||
}
|
||||
|
||||
impl<T: pallet_session::Config + Config> ValidatorSet<T::AccountId> for Pallet<T> {
|
||||
type ValidatorId = T::ValidatorId;
|
||||
type ValidatorIdOf = T::ValidatorIdOf;
|
||||
|
||||
fn session_index() -> sp_staking::SessionIndex {
|
||||
pallet_session::Pallet::<T>::current_index()
|
||||
}
|
||||
|
||||
fn validators() -> Vec<Self::ValidatorId> {
|
||||
pallet_session::Pallet::<T>::validators()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config> ValidatorSetWithIdentification<T::AccountId> for Pallet<T> {
|
||||
type Identification = ();
|
||||
type IdentificationOf = ();
|
||||
}
|
||||
|
||||
impl<T: Config> pallet_session::SessionManager<T::ValidatorId> for Pallet<T> {
|
||||
fn end_session(_: sp_staking::SessionIndex) {}
|
||||
fn start_session(_: sp_staking::SessionIndex) {}
|
||||
|
||||
Reference in New Issue
Block a user