Add log for fork choice integrity in beacon chain

This commit is contained in:
Paul Hauner
2019-08-27 11:19:50 +10:00
parent 1bea1755c4
commit ed6c39e25a
4 changed files with 38 additions and 27 deletions

View File

@@ -199,6 +199,14 @@ impl<T: BeaconChainTypes> ForkChoice<T> {
self.backend.latest_message(validator_index)
}
/// Runs an integrity verification function on the underlying fork choice algorithm.
///
/// Returns `Ok(())` if the underlying fork choice has maintained it's integrity,
/// `Err(description)` otherwise.
pub fn verify_integrity(&self) -> core::result::Result<(), String> {
self.backend.verify_integrity()
}
/// Inform the fork choice that the given block (and corresponding root) have been finalized so
/// it may prune it's storage.
///