mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 16:37:57 +00:00
Expose properties and per-era preferences
This commit is contained in:
+19
-2
@@ -38,6 +38,11 @@ use std::{
|
||||
marker::PhantomData,
|
||||
};
|
||||
|
||||
pub use pallet_staking::{
|
||||
EraIndex,
|
||||
StakingLedger,
|
||||
};
|
||||
|
||||
/// A record of the nominations made by a specific account.
|
||||
#[derive(PartialEq, Eq, Clone, Encode, Decode, Debug, Ord, PartialOrd, Hash)]
|
||||
pub struct Nominations<T: Staking> {
|
||||
@@ -51,6 +56,20 @@ pub struct Nominations<T: Staking> {
|
||||
pub suppressed: bool,
|
||||
}
|
||||
|
||||
/// Similar to `ErasStakers`, this holds the preferences of validators.
|
||||
///
|
||||
/// This is keyed first by the era index to allow bulk deletion and then the stash account.
|
||||
///
|
||||
/// Is it removed after `HISTORY_DEPTH` eras.
|
||||
#[derive(Encode, Decode, Debug, Store)]
|
||||
pub struct ErasValidatorPrefsStore<T: Staking> {
|
||||
#[store(returns = ValidatorPrefs)]
|
||||
/// Era index
|
||||
index: EraIndex,
|
||||
/// Account ID
|
||||
account_id: T::AccountId,
|
||||
}
|
||||
|
||||
/// Information regarding the active era (era in used in session).
|
||||
#[derive(Encode, Decode, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
pub struct ActiveEraInfo<T: Staking> {
|
||||
@@ -161,8 +180,6 @@ pub struct UnlockChunk<T: Staking> {
|
||||
pub era: T::EraIndex,
|
||||
}
|
||||
|
||||
pub use pallet_staking::StakingLedger;
|
||||
|
||||
/// Number of eras to keep in history.
|
||||
///
|
||||
/// Information is kept for eras in `[current_era - history_depth; current_era]`.
|
||||
|
||||
Reference in New Issue
Block a user