Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Merge branch 'master' into gui-impl-iter-for-doublemap
  • Loading branch information
gavofyork authored Apr 13, 2020
commit 1202643077cceece112156234815defb6920375c
10 changes: 8 additions & 2 deletions frame/staking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,12 +512,18 @@ fn post_conditions() {
check_ledgers();
}


pub fn check_exposure_all(era: EraIndex) {
ErasStakers::<Test>::iter_prefix_values(era).for_each(check_exposure)
}

pub(crate) fn active_era() -> EraIndex {
Staking::active_era().unwrap().index
}

pub fn check_exposure_all(era: EraIndex) {
ErasStakers::<Test>::iter_prefix_values(era).for_each(check_exposure)
fn check_ledgers() {
// check the ledger of all stakers.
Bonded::<Test>::iter().for_each(|(_, ctrl)| assert_ledger_consistent(ctrl))
}

fn check_exposures() {
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.