Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memo_overwrite configuration #4103

Merged
merged 5 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/relayer-cli/src/commands/tx/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::prelude::*;
///
/// The macro takes the following arguments:
/// - `$dbg_string`: a string literal that will be used to identify the subcommand
/// in debug logs
/// in debug logs
/// - `$func`: the method that will be called to build and send the `Channel` message
/// - `$self`: the type that `Runnable` is being implemented for
/// - `$chan`: a closure that specifies how to build the `Channel` object
Expand Down
6 changes: 3 additions & 3 deletions crates/relayer-cli/src/conclude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
//! ```
//!
//! - Exit from a query/tx with an error of type `anomaly`:
//! In the case where the error is a complex type such as anomaly (including backtraces), it is
//! better to simplify the output and only write out the chain of error sources, which we can
//! achieve with `format!("{}", e)`. The complete solution is as follows:
//! In the case where the error is a complex type such as anomaly (including backtraces), it is
//! better to simplify the output and only write out the chain of error sources, which we can
//! achieve with `format!("{}", e)`. The complete solution is as follows:
//!
//! ```ignore
//! let e: Error = Kind::Query.into();
Expand Down
2 changes: 0 additions & 2 deletions crates/relayer-cli/tests/acceptance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use once_cell::sync::Lazy;
pub static RUNNER: Lazy<CmdRunner> = Lazy::new(CmdRunner::default);

/// Use `Config::default()` value if no config or args
#[cfg(not(tarpaulin))]
#[test]
fn start_no_args() {
let mut runner = RUNNER.clone();
Expand All @@ -40,7 +39,6 @@ fn start_no_args() {
cmd.wait().unwrap().expect_success();
}

#[cfg(not(tarpaulin))]
#[test]
fn example_configuration_is_valid() {
let mut runner = RUNNER.clone();
Expand Down
2 changes: 2 additions & 0 deletions crates/relayer/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
pub mod compat_mode;
pub mod dynamic_gas;
pub mod error;
/// TODO: Fix mutable_key_type warning
#[allow(clippy::mutable_key_type)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add this within the module itself.

pub mod filter;
pub mod gas_multiplier;
pub mod proof_specs;
Expand Down
2 changes: 2 additions & 0 deletions crates/relayer/src/config/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ impl Default for PacketFilter {
}
}

/// TODO: Fix mutable_key_type warning
#[allow(clippy::mutable_key_type)]
impl PacketFilter {
pub fn new(
channel_policy: ChannelPolicy,
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer/src/link/relay_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ impl<ChainA: ChainHandle, ChainB: ChainHandle> RelayPath<ChainA, ChainB> {
/// Return value:
/// - `Some(..)`: a new operational data from which to retry sending,
/// - `None`: all the events in the initial operational data were exhausted (i.e., turned
/// into timeouts), so there is nothing to retry.
/// into timeouts), so there is nothing to retry.
///
/// Side effects: may schedule a new operational data targeting the source chain, comprising
/// new timeout messages.
Expand Down
4 changes: 4 additions & 0 deletions tools/integration-test/src/tests/fee/filter_fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ fn test_filter_by_channel_incentivized_fees_relayer() -> Result<(), Error> {

struct FilterIncentivizedFeesRelayerTest;

/// TODO: Fix mutable_key_type warning
#[allow(clippy::mutable_key_type)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add this to the whole module.

impl TestOverrides for FilterIncentivizedFeesRelayerTest {
fn modify_relayer_config(&self, config: &mut Config) {
config.mode.packets.auto_register_counterparty_payee = true;
Expand Down Expand Up @@ -166,6 +168,8 @@ impl BinaryChannelTest for FilterIncentivizedFeesRelayerTest {

struct FilterByChannelIncentivizedFeesRelayerTest;

/// TODO: Fix mutable_key_type warning
#[allow(clippy::mutable_key_type)]
impl TestOverrides for FilterByChannelIncentivizedFeesRelayerTest {
fn modify_relayer_config(&self, config: &mut Config) {
config.mode.packets.auto_register_counterparty_payee = true;
Expand Down
2 changes: 1 addition & 1 deletion tools/integration-test/src/tests/memo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn test_memo() -> Result<(), Error> {
#[test]
fn test_memo_overwrite() -> Result<(), Error> {
let memo = Memo::new(random_string()).unwrap();
let test = MemoTest { memo };
let test = MemoOverwriteTest { memo };
run_binary_channel_test(&test)
}

Expand Down
Loading