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

Add integrity test for slash defer duration #6782

Merged
4 commits merged into from
Aug 3, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions frame/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,13 @@ decl_module! {
// `on_finalize` weight is tracked in `on_initialize`
}

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

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