Skip to content

Commit

Permalink
Update pretty module in Cosmos chain implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
DaviRain-Su committed Aug 26, 2023
1 parent c44d2b1 commit 2ac310e
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions crates/relayer/src/chain/cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ use crate::keyring::{KeyRing, Secp256k1KeyPair, SigningKeyPair};
use crate::light_client::tendermint::LightClient as TmLightClient;
use crate::light_client::{LightClient, Verified};
use crate::misbehaviour::MisbehaviourEvidence;
use crate::util::pretty::{
PrettyIdentifiedChannel, PrettyIdentifiedClientState, PrettyIdentifiedConnection,
};
use crate::util::pretty::{PrettyIdentifiedChannel, PrettyIdentifiedConnection};

use self::types::app_state::GenesisAppState;

Expand Down Expand Up @@ -1183,12 +1181,9 @@ impl ChainEndpoint for CosmosSdkChain {
.into_iter()
.filter_map(|cs| {
IdentifiedAnyClientState::try_from(cs.clone())
.map_err(|e| {
warn!(
"failed to parse client state {}. Error: {}",
PrettyIdentifiedClientState(&cs),
e
)
.map_err(|_| {
let (client_type, client_id) = (if let Some(client_state) = &cs.client_state { client_state.type_url.clone() } else { "None".to_string() }, &cs.client_id);
warn!("encountered unsupported client type `{}` while scanning client `{}`, skipping the client", client_type, client_id)
})
.ok()
})
Expand Down

0 comments on commit 2ac310e

Please sign in to comment.