Skip to content

Commit

Permalink
Skip frozen clients
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed Sep 14, 2023
1 parent 4546641 commit 654d70e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions crates/relayer-cli/src/commands/evidence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ use ibc_relayer::chain::handle::{BaseChainHandle, ChainHandle};
use ibc_relayer::chain::requests::{IncludeProof, QueryHeight};
use ibc_relayer::chain::tracking::TrackedMsgs;
use ibc_relayer::chain::ChainType;
use ibc_relayer::foreign_client::{ForeignClient, ForeignClientErrorDetail};
use ibc_relayer::foreign_client::ForeignClient;
use ibc_relayer::spawn::spawn_chain_runtime_with_modified_config;
use ibc_relayer_types::applications::ics28_ccv::msgs::ccv_double_voting::MsgSubmitIcsConsumerDoubleVoting;
use ibc_relayer_types::applications::ics28_ccv::msgs::ccv_misbehaviour::MsgSubmitIcsConsumerMisbehaviour;
use ibc_relayer_types::clients::ics07_tendermint::header::Header as TendermintHeader;
use ibc_relayer_types::clients::ics07_tendermint::misbehaviour::Misbehaviour as TendermintMisbehaviour;
use ibc_relayer_types::core::ics02_client::client_state::ClientState;
use ibc_relayer_types::core::ics02_client::height::Height;
use ibc_relayer_types::core::ics02_client::msgs::misbehaviour::MsgSubmitMisbehaviour;
use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ClientId};
Expand Down Expand Up @@ -430,12 +431,6 @@ fn submit_light_client_attack_evidence(

let mut msgs = match counterparty_client.wait_and_build_update_client(common_height) {
Ok(msgs) => msgs,

Err(e) if matches!(e.detail(), ForeignClientErrorDetail::ExpiredOrFrozen(_)) => {
info!("client is already frozen, skipping reporting of evidence to the node");
return Ok(());
}

Err(e) => {
warn!("skipping update client message");
warn!(
Expand Down Expand Up @@ -577,7 +572,12 @@ fn fetch_all_counterparty_clients(
};

let counterparty_chain_id = client_state.chain_id();
debug!("found counterparty client with id {client_id} on counterparty chain {counterparty_chain_id}");
info!("found counterparty client with id {client_id} on counterparty chain {counterparty_chain_id}");

if client_state.is_frozen() {
info!("counterparty client {client_id} is already frozen, skipping...");
continue;
}

counterparty_clients.push((counterparty_chain_id, client_id.clone()));
}
Expand Down

0 comments on commit 654d70e

Please sign in to comment.