@@ -19,7 +19,6 @@ use tower_http::cors::CorsLayer;
1919use crate :: box_kind:: PoolBox ;
2020use crate :: monitor:: check_oracle_health;
2121use crate :: monitor:: check_pool_health;
22- use crate :: monitor:: HealthStatus ;
2322use crate :: monitor:: OracleHealth ;
2423use crate :: monitor:: PoolHealth ;
2524use crate :: node_interface:: node_api:: NodeApi ;
@@ -214,11 +213,7 @@ fn update_pool_health(pool_health: &PoolHealth) {
214213 POOL_BOX_HEIGHT . set ( pool_health. details . pool_box_height . into ( ) ) ;
215214 CURRENT_HEIGHT . set ( pool_health. details . current_height . into ( ) ) ;
216215 EPOCH_LENGTH . set ( pool_health. details . epoch_length . into ( ) ) ;
217- let health = match pool_health. status {
218- HealthStatus :: Ok => 1 ,
219- HealthStatus :: Down => 0 ,
220- } ;
221- POOL_IS_HEALTHY . set ( health) ;
216+ POOL_IS_HEALTHY . set ( pool_health. status as i64 ) ;
222217 for oracle in & pool_health. details . all_oracles {
223218 let box_type = oracle. box_height . label_name ( ) ;
224219 let box_height = oracle. box_height . oracle_box_height ( ) . into ( ) ;
@@ -242,12 +237,7 @@ fn update_oracle_health(oracle_health: &OracleHealth) {
242237 MY_ORACLE_BOX_HEIGHT
243238 . with_label_values ( & [ box_type] )
244239 . set ( oracle_health. details . box_details . oracle_box_height ( ) . into ( ) ) ;
245-
246- let health = match oracle_health. status {
247- HealthStatus :: Ok => 1 ,
248- HealthStatus :: Down => 0 ,
249- } ;
250- ORACLE_IS_HEALTHY . set ( health) ;
240+ ORACLE_IS_HEALTHY . set ( oracle_health. status as i64 ) ;
251241}
252242
253243fn update_reward_tokens_in_buyback_box ( oracle_pool : Arc < OraclePool > ) {
0 commit comments