From ebfdc17459578e174856a7281db15b3f50a139ea Mon Sep 17 00:00:00 2001 From: "Demi M. Obenour" Date: Sun, 17 May 2020 17:34:24 -0400 Subject: [PATCH] Add staking payout support --- src/frame/staking.rs | 11 ++++++++++- src/runtimes.rs | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/frame/staking.rs b/src/frame/staking.rs index d94e861304..d442021f33 100644 --- a/src/frame/staking.rs +++ b/src/frame/staking.rs @@ -96,11 +96,13 @@ impl Default for RewardDestination { /// Preference of what happens regarding validation. #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] -pub struct ValidatorPrefs { +pub struct ValidatorPrefs { /// Reward that validator takes up-front; only the rest is split between themselves and /// nominators. #[codec(compact)] pub commission: Perbill, + /// Runtime marker + pub _r: PhantomData, } impl Default for ValidatorPrefs { @@ -318,3 +320,10 @@ pub struct NominateCall { /// The targets that are being nominated pub targets: Vec, } + +/// Claim a payout. +#[derive(PartialEq, Eq, Clone, Call, Encode)] +struct PayoutStakersCall<'a, T: System> { + pub validator_stash: &'a T::AccountId, + pub era: EraIndex, +} diff --git a/src/runtimes.rs b/src/runtimes.rs index c11a371b70..0366a86abe 100644 --- a/src/runtimes.rs +++ b/src/runtimes.rs @@ -32,6 +32,7 @@ use crate::frame::{ }, contracts::Contracts, session::Session, + staking::Staking, system::System, };