Skip to content

Commit

Permalink
Revert "Send consumer misbehaviour message IcsConsumerMisbehaviour
Browse files Browse the repository at this point in the history
…to the provider (informalsystems#3220)" (informalsystems#3242)

This reverts commit 188dc72.
  • Loading branch information
romac authored and git committed May 24, 2023
1 parent 8e19997 commit 3190dfe
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 132 deletions.

This file was deleted.

2 changes: 0 additions & 2 deletions crates/relayer-types/src/applications/ics28_ccv/mod.rs

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions crates/relayer-types/src/applications/ics28_ccv/msgs/error.rs

This file was deleted.

2 changes: 0 additions & 2 deletions crates/relayer-types/src/applications/ics28_ccv/msgs/mod.rs

This file was deleted.

2 changes: 1 addition & 1 deletion crates/relayer-types/src/applications/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Various packet encoding semantics which underpin the various types of transactions.
pub mod ics28_ccv;
pub mod ics29_fee;
pub mod ics31_icq;
pub mod transfer;
51 changes: 8 additions & 43 deletions crates/relayer/src/foreign_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ use itertools::Itertools;
use tracing::{debug, error, info, instrument, trace, warn};

use flex_error::define_error;
use ibc_relayer_types::applications::ics28_ccv::msgs::ccv_misbehaviour::MsgSubmitIcsConsumerMisbehaviour;
use ibc_relayer_types::clients::ics07_tendermint::misbehaviour::Misbehaviour;
use ibc_relayer_types::core::ics02_client::client_state::ClientState;
use ibc_relayer_types::core::ics02_client::error::Error as ClientError;
use ibc_relayer_types::core::ics02_client::events::UpdateClient;
Expand All @@ -40,7 +38,7 @@ use crate::consensus_state::AnyConsensusState;
use crate::error::Error as RelayerError;
use crate::event::IbcEventWithHeight;
use crate::light_client::AnyHeader;
use crate::misbehaviour::{AnyMisbehaviour, MisbehaviourEvidence};
use crate::misbehaviour::MisbehaviourEvidence;
use crate::telemetry;
use crate::util::collate::CollatedIterExt;
use crate::util::pretty::{PrettyDuration, PrettySlice};
Expand Down Expand Up @@ -1658,47 +1656,14 @@ impl<DstChain: ChainHandle, SrcChain: ChainHandle> ForeignClient<DstChain, SrcCh
);
}

if self
.dst_chain()
.config()
.map_err(|e| {
ForeignClientError::misbehaviour(
format!("failed querying configureation of dst chain {}", self.id),
e,
)
})?
.ccv_consumer_chain
{
let tm_misbehaviour = match evidence.misbehaviour {
AnyMisbehaviour::Tendermint(tm_misbehaviour) => Some(tm_misbehaviour),
#[cfg(test)]
AnyMisbehaviour::Mock(_) => None,
}
.unwrap();

let msg_misbehaviour = Misbehaviour {
msgs.push(
MsgSubmitMisbehaviour {
misbehaviour: evidence.misbehaviour.into(),
client_id: self.id.clone(),
header1: tm_misbehaviour.header1,
header2: tm_misbehaviour.header2,
};

msgs.push(
MsgSubmitIcsConsumerMisbehaviour {
submitter: signer,
misbehaviour: msg_misbehaviour,
}
.to_any(),
);
} else {
msgs.push(
MsgSubmitMisbehaviour {
misbehaviour: evidence.misbehaviour.into(),
client_id: self.id.clone(),
signer,
}
.to_any(),
);
}
signer,
}
.to_any(),
);

let tm = TrackedMsgs::new_static(msgs, "evidence");

Expand Down

0 comments on commit 3190dfe

Please sign in to comment.