Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ank4n committed Feb 28, 2023
1 parent f9235c0 commit b4abd8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frame/staking/src/pallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ pub mod pallet {
/// 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.
Expand Down Expand Up @@ -486,7 +487,7 @@ pub mod pallet {
/// 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.
/// the page. Should only be accessed through `EraInfo`.
///
/// This is cleared after [`Config::HistoryDepth`] eras.
#[pallet::storage]
Expand Down Expand Up @@ -697,6 +698,8 @@ pub mod pallet {
// validator stake is added only in page zero
let validator_stake = if page == 0 { overview.own } else { Zero::zero() };

// since overview is present, paged exposure will always be present except when a
// validator has only own stake and no nominator stake.
let exposure_page =
<ErasStakersPaged<T>>::get((era, validator, page)).unwrap_or_default();

Expand Down

0 comments on commit b4abd8a

Please sign in to comment.