Add Debug impls

This commit is contained in:
Demi M. Obenour
2020-06-18 13:44:20 -04:00
parent 4d8ccabcec
commit 90e3b9bb4e
6 changed files with 20 additions and 10 deletions
+4 -4
View File
@@ -46,7 +46,7 @@ pub trait Session: System {
}
/// The current set of validators.
#[derive(Encode, Store)]
#[derive(Encode, Store, Debug)]
pub struct ValidatorsStore<T: Session> {
#[store(returns = Vec<<T as Session>::ValidatorId>)]
/// Marker for the runtime
@@ -54,7 +54,7 @@ pub struct ValidatorsStore<T: Session> {
}
/// Current index of the session.
#[derive(Encode, Store)]
#[derive(Encode, Store, Debug)]
pub struct CurrentIndexStore<T: Session> {
#[store(returns = <T as Session>::SessionIndex)]
/// Marker for the runtime
@@ -63,7 +63,7 @@ pub struct CurrentIndexStore<T: Session> {
/// True if the underlying economic identities or weighting behind the validators
/// has changed in the queued validator set.
#[derive(Encode, Store)]
#[derive(Encode, Store, Debug)]
pub struct QueuedChangedStore<T: Session> {
#[store(returns = bool)]
/// Marker for the runtime
@@ -71,7 +71,7 @@ pub struct QueuedChangedStore<T: Session> {
}
/// The current set of validators.
#[derive(Encode, Call)]
#[derive(Encode, Call, Debug)]
pub struct SetKeysCall<T: Session> {
/// The keys
pub keys: T::Keys,
+4 -4
View File
@@ -151,7 +151,7 @@ pub trait Staking: Balances {
}
/// Just a Balance/BlockNumber tuple to encode when a chunk of funds will be unlocked.
#[derive(PartialEq, Eq, Clone, Encode, Decode, Ord, PartialOrd, Hash)]
#[derive(PartialEq, Eq, Clone, Encode, Decode, Ord, PartialOrd, Hash, Debug)]
pub struct UnlockChunk<T: Staking> {
/// Amount of funds to be unlocked.
#[codec(compact)]
@@ -162,7 +162,7 @@ pub struct UnlockChunk<T: Staking> {
}
/// The ledger of a (bonded) stash.
#[derive(PartialEq, Eq, Clone, Encode, Decode, Ord, PartialOrd, Hash)]
#[derive(PartialEq, Eq, Clone, Encode, Decode, Ord, PartialOrd, Hash, Debug)]
pub struct StakingLedger<T: Staking> {
/// The stash account whose balance is actually locked and at stake.
pub stash: T::AccountId,
@@ -334,14 +334,14 @@ pub struct ValidateCall<T: Staking> {
/// - Reads: Era Election Status, Ledger, Current Era
/// - Writes: Validators, Nominators
/// # </weight>
#[derive(Call, Encode)]
#[derive(Call, Encode, Debug)]
pub struct NominateCall<T: Staking> {
/// The targets that are being nominated
pub targets: Vec<T::Address>,
}
/// Claim a payout.
#[derive(PartialEq, Eq, Clone, Call, Encode, Decode)]
#[derive(PartialEq, Eq, Clone, Call, Encode, Decode, Debug)]
struct PayoutStakersCall<'a, T: Staking> {
pub validator_stash: &'a T::AccountId,
pub era: T::EraIndex,