Skip to content

Commit

Permalink
Missing Astria fixes from previous merge
Browse files Browse the repository at this point in the history
  • Loading branch information
zbuc committed Mar 15, 2024
1 parent 2641ffc commit 3eede22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 33 deletions.
6 changes: 3 additions & 3 deletions crates/relayer/src/chain/astria/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ impl AstriaEndpoint {
let ibc_client_grpc_client = rt
.block_on(IbcClientQueryClient::connect(grpc_addr.clone()))
.map_err(Error::grpc_transport)?
.max_decoding_message_size(config.max_grpc_decoding_size().get_bytes() as usize);
.max_decoding_message_size(cosmos_config.max_grpc_decoding_size.get_bytes() as usize);
let ibc_connection_grpc_client = rt
.block_on(IbcConnectionQueryClient::connect(grpc_addr.clone()))
.map_err(Error::grpc_transport)?
.max_decoding_message_size(config.max_grpc_decoding_size().get_bytes() as usize);
.max_decoding_message_size(cosmos_config.max_grpc_decoding_size.get_bytes() as usize);
let ibc_channel_grpc_client = rt
.block_on(IbcChannelQueryClient::connect(grpc_addr))
.map_err(Error::grpc_transport)?
.max_decoding_message_size(config.max_grpc_decoding_size().get_bytes() as usize);
.max_decoding_message_size(cosmos_config.max_grpc_decoding_size.get_bytes() as usize);

Ok(Self {
config,
Expand Down
14 changes: 0 additions & 14 deletions crates/relayer/src/chain/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@ impl ClientSettings {
// Currently, only Tendermint chain pairs are supported by
// ForeignClient::build_create_client_and_send. Support for
// heterogeneous chains is left for future revisions.
//
// TODO: extract Tendermint-related configs into a separate substructure
// that can be used both by CosmosSdkConfig and configs for nonSDK chains.
// let src_chain_config = match src_chain_config {
// ChainConfig::CosmosSdk(src_chain_config) => src_chain_config,
// ChainConfig::Astria(src_chain_config) => src_chain_config,
// ChainConfig::Penumbra(src_chain_config) => todo!(),
// };
// let dst_chain_config = match dst_chain_config {
// ChainConfig::CosmosSdk(dst_chain_config) => dst_chain_config,
// ChainConfig::Astria(dst_chain_config) => dst_chain_config,
// ChainConfig::Penumbra(dst_chain_config) => todo!(),
// };

ClientSettings::Tendermint(crate::chain::client_settings::Settings::for_create_command(
options,
src_chain_config,
Expand Down
16 changes: 0 additions & 16 deletions crates/relayer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,22 +731,6 @@ impl ChainConfig {
}
}

pub fn max_grpc_decoding_size(&self) -> Byte {
match self {
Self::CosmosSdk(config) => config.max_grpc_decoding_size,
Self::Astria(config) => config.max_grpc_decoding_size,
Self::Penumbra(_config) => todo!(),
}
}

pub fn proof_specs(&self) -> &Option<ProofSpecs> {
match self {
Self::CosmosSdk(config) => &config.proof_specs,
Self::Astria(config) => &config.proof_specs,
Self::Penumbra(_config) => todo!(),
}
}

pub fn event_source_mode(&self) -> &EventSourceMode {
match self {
Self::CosmosSdk(config) => &config.event_source,
Expand Down

0 comments on commit 3eede22

Please sign in to comment.