Struct StorageApi

Source
pub struct StorageApi;

Implementations§

Source§

impl StorageApi

Source

pub fn validator_count(&self) -> StaticAddress<(), ValidatorCount, Yes, Yes, ()>

The ideal number of active validators.

Source

pub fn minimum_validator_count( &self, ) -> StaticAddress<(), MinimumValidatorCount, Yes, Yes, ()>

Minimum number of staking participants before emergency conditions are imposed.

Source

pub fn invulnerables(&self) -> StaticAddress<(), Invulnerables, Yes, Yes, ()>

Any validators that may never be slashed or forcibly kicked. It’s a Vec since they’re easy to initialize and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets.

Source

pub fn bonded_iter(&self) -> StaticAddress<(), Bonded, (), (), Yes>

Map from all locked “stash” accounts to the controller account.

TWOX-NOTE: SAFE since AccountId is a secure hash.

Source

pub fn bonded( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, Bonded, Yes, (), ()>

Map from all locked “stash” accounts to the controller account.

TWOX-NOTE: SAFE since AccountId is a secure hash.

Source

pub fn min_nominator_bond( &self, ) -> StaticAddress<(), MinNominatorBond, Yes, Yes, ()>

The minimum active bond to become and maintain the role of a nominator.

Source

pub fn min_validator_bond( &self, ) -> StaticAddress<(), MinValidatorBond, Yes, Yes, ()>

The minimum active bond to become and maintain the role of a validator.

Source

pub fn minimum_active_stake( &self, ) -> StaticAddress<(), MinimumActiveStake, Yes, Yes, ()>

The minimum active nominator stake of the last successful election.

Source

pub fn min_commission(&self) -> StaticAddress<(), MinCommission, Yes, Yes, ()>

The minimum amount of commission that validators can set.

If set to 0, no limit exists.

Source

pub fn ledger_iter(&self) -> StaticAddress<(), Ledger, (), (), Yes>

Map from all (unlocked) “controller” accounts to the info regarding the staking.

Note: All the reads and mutations to this storage MUST be done through the methods exposed by [StakingLedger] to ensure data and lock consistency.

Source

pub fn ledger( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, Ledger, Yes, (), ()>

Map from all (unlocked) “controller” accounts to the info regarding the staking.

Note: All the reads and mutations to this storage MUST be done through the methods exposed by [StakingLedger] to ensure data and lock consistency.

Source

pub fn payee_iter(&self) -> StaticAddress<(), Payee, (), (), Yes>

Where the reward payment should be made. Keyed by stash.

TWOX-NOTE: SAFE since AccountId is a secure hash.

Source

pub fn payee( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, Payee, Yes, (), ()>

Where the reward payment should be made. Keyed by stash.

TWOX-NOTE: SAFE since AccountId is a secure hash.

Source

pub fn validators_iter(&self) -> StaticAddress<(), Validators, (), Yes, Yes>

The map from (wannabe) validator stash key to the preferences of that validator.

TWOX-NOTE: SAFE since AccountId is a secure hash.

Source

pub fn validators( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, Validators, Yes, Yes, ()>

The map from (wannabe) validator stash key to the preferences of that validator.

TWOX-NOTE: SAFE since AccountId is a secure hash.

Source

pub fn counter_for_validators( &self, ) -> StaticAddress<(), CounterForValidators, Yes, Yes, ()>

Counter for the related counted storage map

Source

pub fn max_validators_count( &self, ) -> StaticAddress<(), MaxValidatorsCount, Yes, (), ()>

The maximum validator count before we stop allowing new validators to join.

When this value is not set, no limits are enforced.

Source

pub fn nominators_iter(&self) -> StaticAddress<(), Nominators, (), (), Yes>

The map from nominator stash key to their nomination preferences, namely the validators that they wish to support.

Note that the keys of this storage map might become non-decodable in case the account’s [NominationsQuota::MaxNominations] configuration is decreased. In this rare case, these nominators are still existent in storage, their key is correct and retrievable (i.e. contains_key indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable nominators will effectively not-exist, until they re-submit their preferences such that it is within the bounds of the newly set Config::MaxNominations.

This implies that ::iter_keys().count() and ::iter().count() might return different values for this map. Moreover, the main ::count() is aligned with the former, namely the number of keys that exist.

Lastly, if any of the nominators become non-decodable, they can be chilled immediately via [Call::chill_other] dispatchable by anyone.

TWOX-NOTE: SAFE since AccountId is a secure hash.

Source

pub fn nominators( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, Nominators, Yes, (), ()>

The map from nominator stash key to their nomination preferences, namely the validators that they wish to support.

Note that the keys of this storage map might become non-decodable in case the account’s [NominationsQuota::MaxNominations] configuration is decreased. In this rare case, these nominators are still existent in storage, their key is correct and retrievable (i.e. contains_key indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable nominators will effectively not-exist, until they re-submit their preferences such that it is within the bounds of the newly set Config::MaxNominations.

This implies that ::iter_keys().count() and ::iter().count() might return different values for this map. Moreover, the main ::count() is aligned with the former, namely the number of keys that exist.

Lastly, if any of the nominators become non-decodable, they can be chilled immediately via [Call::chill_other] dispatchable by anyone.

TWOX-NOTE: SAFE since AccountId is a secure hash.

Source

pub fn counter_for_nominators( &self, ) -> StaticAddress<(), CounterForNominators, Yes, Yes, ()>

Counter for the related counted storage map

Source

pub fn virtual_stakers_iter( &self, ) -> StaticAddress<(), VirtualStakers, (), (), Yes>

Stakers whose funds are managed by other pallets.

This pallet does not apply any locks on them, therefore they are only virtually bonded. They are expected to be keyless accounts and hence should not be allowed to mutate their ledger directly via this pallet. Instead, these accounts are managed by other pallets and accessed via low level apis. We keep track of them to do minimal integrity checks.

Source

pub fn virtual_stakers( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, VirtualStakers, Yes, (), ()>

Stakers whose funds are managed by other pallets.

This pallet does not apply any locks on them, therefore they are only virtually bonded. They are expected to be keyless accounts and hence should not be allowed to mutate their ledger directly via this pallet. Instead, these accounts are managed by other pallets and accessed via low level apis. We keep track of them to do minimal integrity checks.

Source

pub fn counter_for_virtual_stakers( &self, ) -> StaticAddress<(), CounterForVirtualStakers, Yes, Yes, ()>

Counter for the related counted storage map

Source

pub fn max_nominators_count( &self, ) -> StaticAddress<(), MaxNominatorsCount, Yes, (), ()>

The maximum nominator count before we stop allowing new validators to join.

When this value is not set, no limits are enforced.

Source

pub fn current_era(&self) -> StaticAddress<(), CurrentEra, Yes, (), ()>

The current era index.

This is the latest planned era, depending on how the Session pallet queues the validator set, it might be active or not.

Source

pub fn active_era(&self) -> StaticAddress<(), ActiveEra, Yes, (), ()>

The active era information, it holds index and start.

The active era is the era being currently rewarded. Validator set of this era must be equal to [SessionInterface::validators].

Source

pub fn eras_start_session_index_iter( &self, ) -> StaticAddress<(), ErasStartSessionIndex, (), (), Yes>

The session index at which the era start for the last [Config::HistoryDepth] eras.

Note: This tracks the starting session (i.e. session index when era start being active) for the eras in [CurrentEra - HISTORY_DEPTH, CurrentEra].

Source

pub fn eras_start_session_index( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasStartSessionIndex, Yes, (), ()>

The session index at which the era start for the last [Config::HistoryDepth] eras.

Note: This tracks the starting session (i.e. session index when era start being active) for the eras in [CurrentEra - HISTORY_DEPTH, CurrentEra].

Source

pub fn eras_stakers_iter(&self) -> StaticAddress<(), ErasStakers, (), Yes, Yes>

Exposure of validator at era.

This is keyed first by the era index to allow bulk deletion and then the stash account.

Is it removed after [Config::HistoryDepth] eras. If stakers hasn’t been set or has been removed then empty exposure is returned.

Note: Deprecated since v14. Use EraInfo instead to work with exposures.

Source

pub fn eras_stakers_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasStakers, (), Yes, Yes>

Exposure of validator at era.

This is keyed first by the era index to allow bulk deletion and then the stash account.

Is it removed after [Config::HistoryDepth] eras. If stakers hasn’t been set or has been removed then empty exposure is returned.

Note: Deprecated since v14. Use EraInfo instead to work with exposures.

Source

pub fn eras_stakers( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakers, Yes, Yes, ()>

Exposure of validator at era.

This is keyed first by the era index to allow bulk deletion and then the stash account.

Is it removed after [Config::HistoryDepth] eras. If stakers hasn’t been set or has been removed then empty exposure is returned.

Note: Deprecated since v14. Use EraInfo instead to work with exposures.

Source

pub fn eras_stakers_overview_iter( &self, ) -> StaticAddress<(), ErasStakersOverview, (), (), Yes>

Summary of validator exposure at a given era.

This contains the total stake in support of the validator and their own stake. In addition, it can also be used to get the number of nominators backing this validator and the number of exposure pages they are divided into. The page count is useful to determine the number of pages of rewards that needs to be claimed.

This is keyed first by the era index to allow bulk deletion and then the stash account. Should only be accessed through EraInfo.

Is it removed after [Config::HistoryDepth] eras. If stakers hasn’t been set or has been removed then empty overview is returned.

Source

pub fn eras_stakers_overview_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasStakersOverview, (), (), Yes>

Summary of validator exposure at a given era.

This contains the total stake in support of the validator and their own stake. In addition, it can also be used to get the number of nominators backing this validator and the number of exposure pages they are divided into. The page count is useful to determine the number of pages of rewards that needs to be claimed.

This is keyed first by the era index to allow bulk deletion and then the stash account. Should only be accessed through EraInfo.

Is it removed after [Config::HistoryDepth] eras. If stakers hasn’t been set or has been removed then empty overview is returned.

Source

pub fn eras_stakers_overview( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakersOverview, Yes, (), ()>

Summary of validator exposure at a given era.

This contains the total stake in support of the validator and their own stake. In addition, it can also be used to get the number of nominators backing this validator and the number of exposure pages they are divided into. The page count is useful to determine the number of pages of rewards that needs to be claimed.

This is keyed first by the era index to allow bulk deletion and then the stash account. Should only be accessed through EraInfo.

Is it removed after [Config::HistoryDepth] eras. If stakers hasn’t been set or has been removed then empty overview is returned.

Source

pub fn eras_stakers_clipped_iter( &self, ) -> StaticAddress<(), ErasStakersClipped, (), Yes, Yes>

Clipped Exposure of validator at era.

Note: This is deprecated, should be used as read-only and will be removed in the future. New Exposures are stored in a paged manner in ErasStakersPaged instead.

This is similar to [ErasStakers] but number of nominators exposed is reduced to the T::MaxExposurePageSize biggest stakers. (Note: the field total and own of the exposure remains unchanged). This is used to limit the i/o cost for the nominator payout.

This is keyed fist by the era index to allow bulk deletion and then the stash account.

It is removed after [Config::HistoryDepth] eras. If stakers hasn’t been set or has been removed then empty exposure is returned.

Note: Deprecated since v14. Use EraInfo instead to work with exposures.

Source

pub fn eras_stakers_clipped_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasStakersClipped, (), Yes, Yes>

Clipped Exposure of validator at era.

Note: This is deprecated, should be used as read-only and will be removed in the future. New Exposures are stored in a paged manner in ErasStakersPaged instead.

This is similar to [ErasStakers] but number of nominators exposed is reduced to the T::MaxExposurePageSize biggest stakers. (Note: the field total and own of the exposure remains unchanged). This is used to limit the i/o cost for the nominator payout.

This is keyed fist by the era index to allow bulk deletion and then the stash account.

It is removed after [Config::HistoryDepth] eras. If stakers hasn’t been set or has been removed then empty exposure is returned.

Note: Deprecated since v14. Use EraInfo instead to work with exposures.

Source

pub fn eras_stakers_clipped( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakersClipped, Yes, Yes, ()>

Clipped Exposure of validator at era.

Note: This is deprecated, should be used as read-only and will be removed in the future. New Exposures are stored in a paged manner in ErasStakersPaged instead.

This is similar to [ErasStakers] but number of nominators exposed is reduced to the T::MaxExposurePageSize biggest stakers. (Note: the field total and own of the exposure remains unchanged). This is used to limit the i/o cost for the nominator payout.

This is keyed fist by the era index to allow bulk deletion and then the stash account.

It is removed after [Config::HistoryDepth] eras. If stakers hasn’t been set or has been removed then empty exposure is returned.

Note: Deprecated since v14. Use EraInfo instead to work with exposures.

Source

pub fn eras_stakers_paged_iter( &self, ) -> StaticAddress<(), ErasStakersPaged, (), (), Yes>

Paginated exposure of a validator at given era.

This is keyed first by the era index to allow bulk deletion, then stash account and finally the page. Should only be accessed through EraInfo.

This is cleared after [Config::HistoryDepth] eras.

Source

pub fn eras_stakers_paged_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasStakersPaged, (), (), Yes>

Paginated exposure of a validator at given era.

This is keyed first by the era index to allow bulk deletion, then stash account and finally the page. Should only be accessed through EraInfo.

This is cleared after [Config::HistoryDepth] eras.

Source

pub fn eras_stakers_paged_iter2( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasStakersPaged, (), (), Yes>

Paginated exposure of a validator at given era.

This is keyed first by the era index to allow bulk deletion, then stash account and finally the page. Should only be accessed through EraInfo.

This is cleared after [Config::HistoryDepth] eras.

Source

pub fn eras_stakers_paged( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, _2: impl Borrow<Param2>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>, StaticStorageKey<Param2>), ErasStakersPaged, Yes, (), ()>

Paginated exposure of a validator at given era.

This is keyed first by the era index to allow bulk deletion, then stash account and finally the page. Should only be accessed through EraInfo.

This is cleared after [Config::HistoryDepth] eras.

Source

pub fn claimed_rewards_iter( &self, ) -> StaticAddress<(), ClaimedRewards, (), Yes, Yes>

History of claimed paged rewards by era and validator.

This is keyed by era and validator stash which maps to the set of page indexes which have been claimed.

It is removed after [Config::HistoryDepth] eras.

Source

pub fn claimed_rewards_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ClaimedRewards, (), Yes, Yes>

History of claimed paged rewards by era and validator.

This is keyed by era and validator stash which maps to the set of page indexes which have been claimed.

It is removed after [Config::HistoryDepth] eras.

Source

pub fn claimed_rewards( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ClaimedRewards, Yes, Yes, ()>

History of claimed paged rewards by era and validator.

This is keyed by era and validator stash which maps to the set of page indexes which have been claimed.

It is removed after [Config::HistoryDepth] eras.

Source

pub fn eras_validator_prefs_iter( &self, ) -> StaticAddress<(), ErasValidatorPrefs, (), Yes, Yes>

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 [Config::HistoryDepth] eras.

Source

pub fn eras_validator_prefs_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasValidatorPrefs, (), Yes, Yes>

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 [Config::HistoryDepth] eras.

Source

pub fn eras_validator_prefs( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ErasValidatorPrefs, Yes, Yes, ()>

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 [Config::HistoryDepth] eras.

Source

pub fn eras_validator_reward_iter( &self, ) -> StaticAddress<(), ErasValidatorReward, (), (), Yes>

The total validator era payout for the last [Config::HistoryDepth] eras.

Eras that haven’t finished yet or has been removed doesn’t have reward.

Source

pub fn eras_validator_reward( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasValidatorReward, Yes, (), ()>

The total validator era payout for the last [Config::HistoryDepth] eras.

Eras that haven’t finished yet or has been removed doesn’t have reward.

Source

pub fn eras_reward_points_iter( &self, ) -> StaticAddress<(), ErasRewardPoints, (), Yes, Yes>

Rewards for the last [Config::HistoryDepth] eras. If reward hasn’t been set or has been removed then 0 reward is returned.

Source

pub fn eras_reward_points( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasRewardPoints, Yes, Yes, ()>

Rewards for the last [Config::HistoryDepth] eras. If reward hasn’t been set or has been removed then 0 reward is returned.

Source

pub fn eras_total_stake_iter( &self, ) -> StaticAddress<(), ErasTotalStake, (), Yes, Yes>

The total amount staked for the last [Config::HistoryDepth] eras. If total hasn’t been set or has been removed then 0 stake is returned.

Source

pub fn eras_total_stake( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ErasTotalStake, Yes, Yes, ()>

The total amount staked for the last [Config::HistoryDepth] eras. If total hasn’t been set or has been removed then 0 stake is returned.

Source

pub fn force_era(&self) -> StaticAddress<(), ForceEra, Yes, Yes, ()>

Mode of era forcing.

Source

pub fn max_staked_rewards( &self, ) -> StaticAddress<(), MaxStakedRewards, Yes, (), ()>

Maximum staked rewards, i.e. the percentage of the era inflation that is used for stake rewards. See Era payout.

Source

pub fn slash_reward_fraction( &self, ) -> StaticAddress<(), SlashRewardFraction, Yes, Yes, ()>

The percentage of the slash that is distributed to reporters.

The rest of the slashed value is handled by the Slash.

Source

pub fn canceled_slash_payout( &self, ) -> StaticAddress<(), CanceledSlashPayout, Yes, Yes, ()>

The amount of currency given to reporters of a slash event which was canceled by extraordinary circumstances (e.g. governance).

Source

pub fn unapplied_slashes_iter( &self, ) -> StaticAddress<(), UnappliedSlashes, (), Yes, Yes>

All unapplied slashes that are queued for later.

Source

pub fn unapplied_slashes( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, UnappliedSlashes, Yes, Yes, ()>

All unapplied slashes that are queued for later.

Source

pub fn bonded_eras(&self) -> StaticAddress<(), BondedEras, Yes, Yes, ()>

A mapping from still-bonded eras to the first session index of that era.

Must contains information for eras for the range: [active_era - bounding_duration; active_era]

Source

pub fn validator_slash_in_era_iter( &self, ) -> StaticAddress<(), ValidatorSlashInEra, (), (), Yes>

All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era.

Source

pub fn validator_slash_in_era_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, ValidatorSlashInEra, (), (), Yes>

All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era.

Source

pub fn validator_slash_in_era( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), ValidatorSlashInEra, Yes, (), ()>

All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era.

Source

pub fn nominator_slash_in_era_iter( &self, ) -> StaticAddress<(), NominatorSlashInEra, (), (), Yes>

All slashing events on nominators, mapped by era to the highest slash value of the era.

Source

pub fn nominator_slash_in_era_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, NominatorSlashInEra, (), (), Yes>

All slashing events on nominators, mapped by era to the highest slash value of the era.

Source

pub fn nominator_slash_in_era( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), NominatorSlashInEra, Yes, (), ()>

All slashing events on nominators, mapped by era to the highest slash value of the era.

Source

pub fn slashing_spans_iter( &self, ) -> StaticAddress<(), SlashingSpans, (), (), Yes>

Slashing spans for stash accounts.

Source

pub fn slashing_spans( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, SlashingSpans, Yes, (), ()>

Slashing spans for stash accounts.

Source

pub fn span_slash_iter(&self) -> StaticAddress<(), SpanSlash, (), Yes, Yes>

Records information about the maximum slash of a stash within a slashing span, as well as how much reward has been paid out.

Source

pub fn span_slash_iter1( &self, _0: impl Borrow<Param0>, ) -> StaticAddress<StaticStorageKey<Param0>, SpanSlash, (), Yes, Yes>

Records information about the maximum slash of a stash within a slashing span, as well as how much reward has been paid out.

Source

pub fn span_slash( &self, _0: impl Borrow<Param0>, _1: impl Borrow<Param1>, ) -> StaticAddress<(StaticStorageKey<Param0>, StaticStorageKey<Param1>), SpanSlash, Yes, Yes, ()>

Records information about the maximum slash of a stash within a slashing span, as well as how much reward has been paid out.

Source

pub fn current_planned_session( &self, ) -> StaticAddress<(), CurrentPlannedSession, Yes, Yes, ()>

The last planned session scheduled by the session pallet.

This is basically in sync with the call to [pallet_session::SessionManager::new_session].

Source

pub fn disabled_validators( &self, ) -> StaticAddress<(), DisabledValidators, Yes, Yes, ()>

Indices of validators that have offended in the active era. The offenders are disabled for a whole era. For this reason they are kept here - only staking pallet knows about eras. The implementor of [DisablingStrategy] defines if a validator should be disabled which implicitly means that the implementor also controls the max number of disabled validators.

The vec is always kept sorted so that we can find whether a given validator has previously offended using binary search.

Source

pub fn chill_threshold(&self) -> StaticAddress<(), ChillThreshold, Yes, (), ()>

The threshold for when users can start calling chill_other for other validators / nominators. The threshold is compared to the actual number of validators / nominators (CountFor*) in the system compared to the configured max (Max*Count).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> JsonSchemaMaybe for T

Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSendSync for T