mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 16:17:59 +00:00
Force new era only if 1/3 validators is disabled. (#3533)
* Force new era only when over third validators is disabled. * Update srml/session/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update srml/staking/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Parametrize the threshold. * Bump runtime version. * Update node/runtime/src/lib.rs * Fix build. * Fix im-online test.
This commit is contained in:
committed by
Gavin Wood
parent
bfe240d1b0
commit
668acca9ed
@@ -211,6 +211,9 @@ impl_opaque_keys! {
|
||||
// `SessionKeys`.
|
||||
// TODO: Introduce some structure to tie these together to make it a bit less of a footgun. This
|
||||
// should be easy, since OneSessionHandler trait provides the `Key` as an associated type. #2858
|
||||
parameter_types! {
|
||||
pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17);
|
||||
}
|
||||
|
||||
impl session::Trait for Runtime {
|
||||
type OnSessionEnding = Staking;
|
||||
@@ -221,6 +224,7 @@ impl session::Trait for Runtime {
|
||||
type ValidatorId = AccountId;
|
||||
type ValidatorIdOf = staking::StashOf<Self>;
|
||||
type SelectInitialValidators = Staking;
|
||||
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
|
||||
}
|
||||
|
||||
impl session::historical::Trait for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user