Skip to content

Commit

Permalink
some minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gjermundgaraba committed Jan 3, 2025
1 parent 8e46750 commit 747464b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions e2e/interchaintestv8/relayer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (s *RelayerTestSuite) SetupSuite(ctx context.Context, proofType operator.Su
var configInfo relayer.EthCosmosConfigInfo
s.Require().True(s.Run("Start Relayer", func() {
beaconAPI := ""
// The BeaconAPIClient is nil when the testnet is `pow`
if eth.BeaconAPIClient != nil {
beaconAPI = eth.BeaconAPIClient.GetBeaconAPIURL()
}
Expand Down
5 changes: 0 additions & 5 deletions packages/ethereum/ethereum-light-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,3 @@ hex = { workspace = true }

# Only used for test-utils feature
milagro_bls = { workspace = true, optional = true }

[dev-dependencies]
milagro_bls = { workspace = true }


5 changes: 3 additions & 2 deletions packages/relayer-lib/src/utils/cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ pub fn target_events_to_timeout_msgs(

/// Converts a list of [`EurekaEvent`]s to a list of [`MsgRecvPacket`]s and
/// [`MsgAcknowledgement`]s.
/// # Errors
/// Returns an error if proof cannot be generated, or membership value is empty for a packet.
pub fn src_events_to_recv_and_ack_msgs(
src_events: Vec<EurekaEvent>,
target_channel_id: &str,
Expand Down Expand Up @@ -108,6 +106,9 @@ pub fn src_events_to_recv_and_ack_msgs(
(recv_msgs, ack_msgs)
}

/// Generates and injects tendermint proofs for rec, ack and timeout messages.
/// # Errors
/// Returns an error a proof cannot be generated for any of the provided messages.
pub async fn inject_tendermint_proofs(
recv_msgs: &mut [MsgRecvPacket],
ack_msgs: &mut [MsgAcknowledgement],
Expand Down
3 changes: 3 additions & 0 deletions programs/relayer/src/modules/cosmos_to_cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ impl RelayerService for CosmosToCosmosRelayerModuleServer {
request: Request<api::RelayByTxRequest>,
) -> Result<Response<api::RelayByTxResponse>, tonic::Status> {
tracing::info!("Handling relay by tx request for cosmos to cosmos...");

let inner_req = request.into_inner();
tracing::info!("Got {} source tx IDs", inner_req.source_tx_ids.len());
tracing::info!("Got {} timeout tx IDs", inner_req.timeout_tx_ids.len());
let src_txs = inner_req
.source_tx_ids
.into_iter()
Expand Down
5 changes: 3 additions & 2 deletions programs/relayer/src/modules/cosmos_to_eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ impl RelayerService for CosmosToEthRelayerModuleServer {
request: Request<api::RelayByTxRequest>,
) -> Result<Response<api::RelayByTxResponse>, tonic::Status> {
tracing::info!("Handling relay by tx request for cosmos to eth...");

let inner_req = request.into_inner();
tracing::info!("Got {} source_tx_ids", inner_req.source_tx_ids.len());
tracing::info!("Got {} timeout_tx_ids", inner_req.timeout_tx_ids.len());
tracing::info!("Got {} source tx IDs", inner_req.source_tx_ids.len());
tracing::info!("Got {} timeout tx IDs", inner_req.timeout_tx_ids.len());
let cosmos_txs = inner_req
.source_tx_ids
.into_iter()
Expand Down
3 changes: 3 additions & 0 deletions programs/relayer/src/modules/eth_to_cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ impl RelayerService for EthToCosmosRelayerModuleServer {
request: Request<api::RelayByTxRequest>,
) -> Result<Response<api::RelayByTxResponse>, tonic::Status> {
tracing::info!("Handling relay by tx request for eth to cosmos...");

let inner_req = request.into_inner();
tracing::info!("Got {} source tx IDs", inner_req.source_tx_ids.len());
tracing::info!("Got {} timeout tx IDs", inner_req.timeout_tx_ids.len());
let eth_txs = inner_req
.source_tx_ids
.into_iter()
Expand Down

0 comments on commit 747464b

Please sign in to comment.