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

Commit

Permalink
companion: for #6782
Browse files Browse the repository at this point in the history
  • Loading branch information
aurexav committed Aug 17, 2020
1 parent 427cbc8 commit 63b13a9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frame/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,17 @@ decl_module! {
// `on_finalize` weight is tracked in `on_initialize`
}

fn integrity_test() {
sp_io::TestExternalities::new_empty().execute_with(||
assert!(
T::SlashDeferDuration::get() < T::BondingDurationInEra::get() || T::BondingDurationInEra::get() == 0,
"As per documentation, slash defer duration ({}) should be less than bonding duration ({}).",
T::SlashDeferDuration::get(),
T::BondingDurationInEra::get(),
)
);
}

/// Take the origin account as a stash and lock up `value` of its balance. `controller` will
/// be the account that controls it.
///
Expand Down

0 comments on commit 63b13a9

Please sign in to comment.