From e4b3bf27eae2ac11a75a34b106e56ea0cb91a716 Mon Sep 17 00:00:00 2001 From: yito88 Date: Mon, 2 Sep 2024 11:48:01 +0200 Subject: [PATCH] impl shutdown --- crates/relayer/src/chain/namada.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/crates/relayer/src/chain/namada.rs b/crates/relayer/src/chain/namada.rs index 12737b118a..07ea264f78 100644 --- a/crates/relayer/src/chain/namada.rs +++ b/crates/relayer/src/chain/namada.rs @@ -1,6 +1,7 @@ use alloc::sync::Arc; use core::str::FromStr; use std::thread; +use tracing::debug; use core::time::Duration; @@ -250,6 +251,10 @@ impl ChainEndpoint for NamadaChain { } fn shutdown(self) -> Result<(), Error> { + if let Some(monitor_tx) = self.tx_monitor_cmd { + monitor_tx.shutdown().map_err(Error::event_source)?; + } + Ok(()) } @@ -631,7 +636,10 @@ impl ChainEndpoint for NamadaChain { heights.push(height); } // the key is not for a consensus state - Err(_) => continue, + Err(_) => { + debug!("The key {key} is not for a consensus state"); + continue; + } } } Ok(heights)