Newer
Older
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
&initially_disabled,
);
assert!(disable_offender.is_none());
});
}
#[test]
fn disable_when_below_byzantine_threshold() {
sp_io::TestExternalities::default().execute_with(|| {
let initially_disabled = vec![1];
pallet_session::Validators::<Test>::put(ACTIVE_SET.to_vec());
let disable_offender =
<UpToLimitDisablingStrategy as DisablingStrategy<Test>>::decision(
&OFFENDER_ID,
SLASH_ERA,
&initially_disabled,
);
assert_eq!(disable_offender, Some(OFFENDER_VALIDATOR_IDX));
});
}
}