mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-23 03:59:22 +00:00
Ensure pallet-session is initialized after staking
This commit is contained in:
parent
c3fdb9d9df
commit
d29d19bdfe
2 changed files with 15 additions and 15 deletions
|
@ -47,9 +47,9 @@ pallet-transaction-payment = { git = "https://github.com/serai-dex/substrate", d
|
|||
|
||||
coins-pallet = { package = "serai-coins-pallet", path = "../coins/pallet", default-features = false }
|
||||
|
||||
pallet-session = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets/pallet", default-features = false }
|
||||
staking-pallet = { package = "serai-staking-pallet", path = "../staking/pallet", default-features = false }
|
||||
pallet-session = { git = "https://github.com/serai-dex/substrate", default-features = false }
|
||||
|
||||
in-instructions-pallet = { package = "serai-in-instructions-pallet", path = "../in-instructions/pallet", default-features = false }
|
||||
|
||||
|
@ -102,9 +102,9 @@ std = [
|
|||
|
||||
"coins-pallet/std",
|
||||
|
||||
"pallet-session/std",
|
||||
"validator-sets-pallet/std",
|
||||
"staking-pallet/std",
|
||||
"pallet-session/std",
|
||||
|
||||
"in-instructions-pallet/std",
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ pub use pallet_transaction_payment as transaction_payment;
|
|||
|
||||
pub use coins_pallet as coins;
|
||||
|
||||
pub use pallet_session as session;
|
||||
pub use staking_pallet as staking;
|
||||
pub use validator_sets_pallet as validator_sets;
|
||||
pub use pallet_session as session;
|
||||
|
||||
pub use in_instructions_pallet as in_instructions;
|
||||
|
||||
|
@ -166,12 +166,6 @@ impl Contains<RuntimeCall> for CallFilter {
|
|||
timestamp::Call::__Ignore(_, _) => false,
|
||||
},
|
||||
|
||||
RuntimeCall::Session(call) => match call {
|
||||
session::Call::set_keys { .. } => true,
|
||||
session::Call::purge_keys { .. } => true,
|
||||
session::Call::__Ignore(_, _) => false,
|
||||
},
|
||||
|
||||
// All of these pallets are our own, and all of their written calls are intended to be called
|
||||
RuntimeCall::Coins(call) => !matches!(call, coins::Call::__Ignore(_, _)),
|
||||
RuntimeCall::ValidatorSets(call) => !matches!(call, validator_sets::Call::__Ignore(_, _)),
|
||||
|
@ -179,6 +173,12 @@ impl Contains<RuntimeCall> for CallFilter {
|
|||
RuntimeCall::InInstructions(call) => !matches!(call, in_instructions::Call::__Ignore(_, _)),
|
||||
RuntimeCall::Signals(call) => !matches!(call, signals::Call::__Ignore(_, _)),
|
||||
|
||||
RuntimeCall::Session(call) => match call {
|
||||
session::Call::set_keys { .. } => true,
|
||||
session::Call::purge_keys { .. } => false,
|
||||
session::Call::__Ignore(_, _) => false,
|
||||
},
|
||||
|
||||
RuntimeCall::Babe(call) => match call {
|
||||
babe::Call::report_equivocation { .. } => true,
|
||||
babe::Call::report_equivocation_unsigned { .. } => true,
|
||||
|
@ -245,6 +245,11 @@ impl coins::Config for Runtime {
|
|||
type RuntimeEvent = RuntimeEvent;
|
||||
}
|
||||
|
||||
impl validator_sets::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
}
|
||||
impl staking::Config for Runtime {}
|
||||
|
||||
pub struct IdentityValidatorIdOf;
|
||||
impl Convert<PublicKey, Option<PublicKey>> for IdentityValidatorIdOf {
|
||||
fn convert(key: PublicKey) -> Option<PublicKey> {
|
||||
|
@ -264,11 +269,6 @@ impl session::Config for Runtime {
|
|||
type WeightInfo = session::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
impl validator_sets::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
}
|
||||
impl staking::Config for Runtime {}
|
||||
|
||||
impl signals::Config for Runtime {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
// 1 week
|
||||
|
@ -346,9 +346,9 @@ construct_runtime!(
|
|||
|
||||
Coins: coins,
|
||||
|
||||
Session: session,
|
||||
ValidatorSets: validator_sets,
|
||||
Staking: staking,
|
||||
Session: session,
|
||||
|
||||
InInstructions: in_instructions,
|
||||
|
||||
|
|
Loading…
Reference in a new issue