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

Commit

Permalink
Companion for substrate/6782 (#1523)
Browse files Browse the repository at this point in the history
* Fix test-runtime

* Remove duplicate tests
  • Loading branch information
kianenigma authored Aug 3, 2020
1 parent 7f97b50 commit 1155ade
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 40 deletions.
13 changes: 0 additions & 13 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1336,16 +1336,3 @@ sp_api::impl_runtime_apis! {
}
}
}

#[cfg(test)]
mod tests {
use super::Runtime;

#[test]
fn slash_defer_less_than_bonding_duration() {
assert!(
<Runtime as staking::Trait>::SlashDeferDuration::get()
< <Runtime as staking::Trait>::BondingDuration::get()
);
}
}
13 changes: 0 additions & 13 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1474,16 +1474,3 @@ sp_api::impl_runtime_apis! {
}
}
}

#[cfg(test)]
mod tests {
use super::Runtime;

#[test]
fn slash_defer_less_than_bonding_duration() {
assert!(
<Runtime as staking::Trait>::SlashDeferDuration::get()
< <Runtime as staking::Trait>::BondingDuration::get()
);
}
}
4 changes: 2 additions & 2 deletions runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ parameter_types! {
pub storage SessionsPerEra: SessionIndex = 6;
// 28 eras for unbonding (7 days).
pub storage BondingDuration: staking::EraIndex = 28;
// 28 eras in which slashes can be cancelled (7 days).
pub storage SlashDeferDuration: staking::EraIndex = 28;
// 27 eras in which slashes can be cancelled (a bit less than 7 days).
pub storage SlashDeferDuration: staking::EraIndex = 27;
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
pub storage MaxNominatorRewardedPerValidator: u32 = 64;
pub storage ElectionLookahead: BlockNumber = 0;
Expand Down
12 changes: 0 additions & 12 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1113,15 +1113,3 @@ sp_api::impl_runtime_apis! {
}
}

#[cfg(test)]
mod tests {
use super::Runtime;

#[test]
fn slash_defer_less_than_bonding_duration() {
assert!(
<Runtime as staking::Trait>::SlashDeferDuration::get()
< <Runtime as staking::Trait>::BondingDuration::get()
);
}
}

0 comments on commit 1155ade

Please sign in to comment.