mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 03:35:43 +00:00
Add integrity test for slash defer duration (#6782)
* Add integrity test for slash defer duration * Wrap in externalities * Update frame/staking/src/lib.rs
This commit is contained in:
@@ -1459,6 +1459,17 @@ decl_module! {
|
|||||||
// `on_finalize` weight is tracked in `on_initialize`
|
// `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
|
/// Take the origin account as a stash and lock up `value` of its balance. `controller` will
|
||||||
/// be the account that controls it.
|
/// be the account that controls it.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user