Skip to content

Commit

Permalink
impl shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Sep 2, 2024
1 parent 29b68f4 commit e4b3bf2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/relayer/src/chain/namada.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use alloc::sync::Arc;
use core::str::FromStr;
use std::thread;
use tracing::debug;

use core::time::Duration;

Expand Down Expand Up @@ -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(())
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e4b3bf2

Please sign in to comment.