Add Exit support to test_harness

This commit is contained in:
Paul Hauner
2019-03-04 12:21:24 +11:00
parent f4d8b41a09
commit ef006bfb2c
6 changed files with 111 additions and 1 deletions

View File

@@ -68,6 +68,11 @@ impl Validator {
pub fn is_penalized_at(&self, epoch: Epoch) -> bool {
self.penalized_epoch <= epoch
}
/// Returns `true` if the validator is considered penalized at some epoch.
pub fn has_initiated_exit(&self) -> bool {
self.status_flags == Some(StatusFlags::InitiatedExit)
}
}
impl Default for Validator {