Enable Offchain Phragmén. (#940)

* fix for offchain phragmen

* Update unix time stuff
This commit is contained in:
Kian Paimani
2020-03-26 17:52:10 +01:00
committed by GitHub
parent 775ce50cc2
commit caa405e1eb
7 changed files with 4108 additions and 4258 deletions
+7
View File
@@ -250,6 +250,7 @@ impl session::Trait for Runtime {
type ValidatorId = AccountId;
type ValidatorIdOf = staking::StashOf<Self>;
type ShouldEndSession = Babe;
type NextSessionRotation = Babe;
type SessionManager = Staking;
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
@@ -281,6 +282,8 @@ parameter_types! {
pub const SlashDeferDuration: staking::EraIndex = 28;
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
pub const MaxNominatorRewardedPerValidator: u32 = 64;
// quarter of the last session will be for election.
pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4;
}
impl staking::Trait for Runtime {
@@ -299,6 +302,10 @@ impl staking::Trait for Runtime {
type SessionInterface = Self;
type RewardCurve = RewardCurve;
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
type NextNewSession = Session;
type ElectionLookahead = ElectionLookahead;
type Call = Call;
type SubmitTransaction = TransactionSubmitter<(), Runtime, UncheckedExtrinsic>;
}
parameter_types! {