Skip to content

Commit

Permalink
update: test
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Dec 26, 2019
1 parent 327553c commit 63af175
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion srml/im-online/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ use support::{assert_noop, dispatch};

#[test]
fn test_unresponsiveness_slash_fraction() {
// A single case of unresponsiveness is not slashed.
// 1 ~ 2 offline should be punished 0.3%.
assert_eq!(
UnresponsivenessOffence::<()>::slash_fraction(1, 50),
Perbill::from_parts(3000000), // 0.3%
);
assert_eq!(
UnresponsivenessOffence::<()>::slash_fraction(2, 50),
Perbill::from_parts(3000000), // 0.3%
);

assert_eq!(
UnresponsivenessOffence::<()>::slash_fraction(3, 50),
Expand Down

0 comments on commit 63af175

Please sign in to comment.