diff --git a/bridges/bin/millau/node/Cargo.toml b/bridges/bin/millau/node/Cargo.toml index 3825b92b703c..9498b7311370 100644 --- a/bridges/bin/millau/node/Cargo.toml +++ b/bridges/bin/millau/node/Cargo.toml @@ -12,7 +12,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] clap = { version = "3.1", features = ["derive"] } jsonrpc-core = "18.0" -serde_json = "1.0.59" +serde_json = "1.0.79" # Bridge dependencies diff --git a/bridges/bin/millau/node/src/command.rs b/bridges/bin/millau/node/src/command.rs index 4dbf9575dfec..3653428d1044 100644 --- a/bridges/bin/millau/node/src/command.rs +++ b/bridges/bin/millau/node/src/command.rs @@ -135,7 +135,7 @@ pub fn run() -> sc_cli::Result<()> { let runner = cli.create_runner(cmd)?; runner.async_run(|config| { let PartialComponents { client, task_manager, backend, .. } = new_partial(&config)?; - Ok((cmd.run(client, backend), task_manager)) + Ok((cmd.run(client, backend, None), task_manager)) }) }, Some(Subcommand::Inspect(cmd)) => { diff --git a/bridges/bin/rialto-parachain/node/src/command.rs b/bridges/bin/rialto-parachain/node/src/command.rs index c47e742675da..f93a939b9ecb 100644 --- a/bridges/bin/rialto-parachain/node/src/command.rs +++ b/bridges/bin/rialto-parachain/node/src/command.rs @@ -202,9 +202,11 @@ pub fn run() -> Result<()> { }) }, Some(Subcommand::Revert(cmd)) => { - construct_async_run!(|components, cli, cmd, config| Ok( - cmd.run(components.client, components.backend) - )) + construct_async_run!(|components, cli, cmd, config| Ok(cmd.run( + components.client, + components.backend, + None + ))) }, Some(Subcommand::ExportGenesisState(params)) => { let mut builder = sc_cli::LoggerBuilder::new(""); diff --git a/bridges/bin/rialto/node/Cargo.toml b/bridges/bin/rialto/node/Cargo.toml index e44ceb45faa9..31699ffad029 100644 --- a/bridges/bin/rialto/node/Cargo.toml +++ b/bridges/bin/rialto/node/Cargo.toml @@ -16,7 +16,7 @@ jsonrpc-core = "18.0" kvdb = "0.11" kvdb-rocksdb = "0.15" lru = "0.7" -serde_json = "1.0.59" +serde_json = "1.0.79" thiserror = "1.0" # Bridge dependencies diff --git a/bridges/bin/rialto/node/src/command.rs b/bridges/bin/rialto/node/src/command.rs index da92837f06c0..24e73f6fffc3 100644 --- a/bridges/bin/rialto/node/src/command.rs +++ b/bridges/bin/rialto/node/src/command.rs @@ -147,7 +147,7 @@ pub fn run() -> sc_cli::Result<()> { runner.async_run(|mut config| { let (client, backend, _, task_manager) = polkadot_service::new_chain_ops(&mut config, None).map_err(service_error)?; - Ok((cmd.run(client, backend), task_manager)) + Ok((cmd.run(client, backend, None), task_manager)) }) }, Some(Subcommand::Inspect(cmd)) => { diff --git a/bridges/relays/bin-substrate/src/cli/relay_headers_and_messages.rs b/bridges/relays/bin-substrate/src/cli/relay_headers_and_messages.rs index 4ff6ee0947cb..d071d1f8910f 100644 --- a/bridges/relays/bin-substrate/src/cli/relay_headers_and_messages.rs +++ b/bridges/relays/bin-substrate/src/cli/relay_headers_and_messages.rs @@ -330,9 +330,9 @@ impl RelayHeadersAndMessages { LeftToRightMessageLane, Left, >( - left_client.clone(), + left_client, TransactionParams { - signer: left_messages_pallet_owner.clone(), + signer: left_messages_pallet_owner, mortality: left_transactions_mortality, }, left_to_right_metrics @@ -366,9 +366,9 @@ impl RelayHeadersAndMessages { RightToLeftMessageLane, Right, >( - right_client.clone(), + right_client, TransactionParams { - signer: right_messages_pallet_owner.clone(), + signer: right_messages_pallet_owner, mortality: right_transactions_mortality, }, right_to_left_metrics diff --git a/bridges/relays/bin-substrate/src/cli/swap_tokens.rs b/bridges/relays/bin-substrate/src/cli/swap_tokens.rs index 0758deddfd10..1467df3711c3 100644 --- a/bridges/relays/bin-substrate/src/cli/swap_tokens.rs +++ b/bridges/relays/bin-substrate/src/cli/swap_tokens.rs @@ -221,7 +221,7 @@ impl SwapTokens { _, >( &source_client, - target_to_source_conversion_rate_override.clone(), + target_to_source_conversion_rate_override, ESTIMATE_SOURCE_TO_TARGET_MESSAGE_FEE_METHOD, SOURCE_TO_TARGET_LANE_ID, bp_message_dispatch::MessagePayload { @@ -384,7 +384,7 @@ impl SwapTokens { _, >( &target_client, - source_to_target_conversion_rate_override.clone(), + source_to_target_conversion_rate_override, ESTIMATE_TARGET_TO_SOURCE_MESSAGE_FEE_METHOD, TARGET_TO_SOURCE_LANE_ID, claim_swap_message.clone(), diff --git a/bridges/relays/client-substrate/src/chain.rs b/bridges/relays/client-substrate/src/chain.rs index 60adfb0a88ac..a55fa64d850c 100644 --- a/bridges/relays/client-substrate/src/chain.rs +++ b/bridges/relays/client-substrate/src/chain.rs @@ -151,6 +151,7 @@ impl UnsignedTransaction { } /// Set transaction tip. + #[must_use] pub fn tip(mut self, tip: C::Balance) -> Self { self.tip = tip; self diff --git a/bridges/relays/utils/src/metrics.rs b/bridges/relays/utils/src/metrics.rs index 084f72e7950c..b5225fca0e0c 100644 --- a/bridges/relays/utils/src/metrics.rs +++ b/bridges/relays/utils/src/metrics.rs @@ -105,6 +105,7 @@ impl MetricsParams { } /// Do not expose metrics. + #[must_use] pub fn disable(mut self) -> Self { self.address = None; self diff --git a/bridges/relays/utils/src/relay_loop.rs b/bridges/relays/utils/src/relay_loop.rs index 521a6345d3e3..3c1d2d4ae828 100644 --- a/bridges/relays/utils/src/relay_loop.rs +++ b/bridges/relays/utils/src/relay_loop.rs @@ -85,6 +85,7 @@ pub struct LoopMetrics { impl Loop { /// Customize delay between reconnect attempts. + #[must_use] pub fn reconnect_delay(mut self, reconnect_delay: Duration) -> Self { self.reconnect_delay = reconnect_delay; self