From 8178d505c3ced83ec958eacb701ecd5334cec73e Mon Sep 17 00:00:00 2001 From: Jedrzej Stuczynski Date: Mon, 13 Jan 2020 15:23:06 +0000 Subject: [PATCH] PathChecker holding mapping of paths to their statuses --- validator/src/validator/health_check/path_check.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/validator/src/validator/health_check/path_check.rs b/validator/src/validator/health_check/path_check.rs index 90c5070061..1e6eb58729 100644 --- a/validator/src/validator/health_check/path_check.rs +++ b/validator/src/validator/health_check/path_check.rs @@ -8,17 +8,20 @@ use sphinx::route::{Destination, Node as SphinxNode}; use std::collections::HashMap; use topology::MixProviderNode; -#[derive(Debug)] -pub(crate) enum PathCheckerError { - CouldNotRegisterWithEndProviderError, +#[derive(Debug, PartialEq, Clone)] +pub enum PathStatus { + Healthy, + Unhealthy, + Pending, } pub(crate) struct PathChecker { provider_clients: HashMap<[u8; 32], Option>, // currently this is an overkill as MixClient is extremely cheap to create, // however, once we introduce persistent connection between client and layer one mixes, - // this will be extremely helfpul to have + // this will be extremely helpful to have layer_one_clients: HashMap<[u8; 32], Option>, + paths_status: HashMap, PathStatus>, our_destination: Destination, }