Skip to content
Snippets Groups Projects
Commit 1a84ad87 authored by Kian Paimani's avatar Kian Paimani Committed by GitHub
Browse files

Add integrity test for slash defer duration (#6782)

* Add integrity test for slash defer duration

* Wrap in externalities

* Update frame/staking/src/lib.rs
parent dd6ef0a3
No related merge requests found
......@@ -1459,6 +1459,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::BondingDuration::get() || T::BondingDuration::get() == 0,
"As per documentation, slash defer duration ({}) should be less than bonding duration ({}).",
T::SlashDeferDuration::get(),
T::BondingDuration::get(),
)
);
}
/// Take the origin account as a stash and lock up `value` of its balance. `controller` will
/// be the account that controls it.
///
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment