diff --git a/bridges/primitives/chain-rococo/src/lib.rs b/bridges/primitives/chain-rococo/src/lib.rs index a47f0277ef..a216148a66 100644 --- a/bridges/primitives/chain-rococo/src/lib.rs +++ b/bridges/primitives/chain-rococo/src/lib.rs @@ -37,7 +37,7 @@ pub type Rococo = PolkadotLike; /// /// Note that since this is a target sessions may change before/after this time depending on network /// conditions. -pub const SESSION_LENGTH: BlockNumber = 1 * time_units::HOURS; +pub const SESSION_LENGTH: BlockNumber = time_units::HOURS; // NOTE: This needs to be kept up to date with the Rococo runtime found in the Polkadot repo. pub const VERSION: RuntimeVersion = RuntimeVersion { diff --git a/bridges/primitives/chain-wococo/src/lib.rs b/bridges/primitives/chain-wococo/src/lib.rs index a05a2ad46a..98d9cbbb6b 100644 --- a/bridges/primitives/chain-wococo/src/lib.rs +++ b/bridges/primitives/chain-wococo/src/lib.rs @@ -35,7 +35,7 @@ pub type Wococo = PolkadotLike; /// /// Note that since this is a target sessions may change before/after this time depending on network /// conditions. -pub const SESSION_LENGTH: BlockNumber = 1 * time_units::MINUTES; +pub const SESSION_LENGTH: BlockNumber = time_units::MINUTES; // We use this to get the account on Wococo (target) which is derived from Rococo's (source) // account. diff --git a/bridges/primitives/polkadot-core/src/lib.rs b/bridges/primitives/polkadot-core/src/lib.rs index 2f7f6289a3..a56adfd233 100644 --- a/bridges/primitives/polkadot-core/src/lib.rs +++ b/bridges/primitives/polkadot-core/src/lib.rs @@ -346,11 +346,10 @@ where // we shall not ever see this error in relay, because we are never signing decoded // transactions. Instead we're constructing and signing new transactions. So the error code // is kinda random here - self.additional_signed.ok_or_else(|| { - frame_support::unsigned::TransactionValidityError::Unknown( + self.additional_signed + .ok_or(frame_support::unsigned::TransactionValidityError::Unknown( frame_support::unsigned::UnknownTransaction::Custom(0xFF), - ) - }) + )) } fn pre_dispatch( diff --git a/bridges/relays/bin-substrate/src/cli/reinit_bridge.rs b/bridges/relays/bin-substrate/src/cli/reinit_bridge.rs index 2871d144a9..89470872cb 100644 --- a/bridges/relays/bin-substrate/src/cli/reinit_bridge.rs +++ b/bridges/relays/bin-substrate/src/cli/reinit_bridge.rs @@ -312,7 +312,7 @@ async fn best_source_block_number_at_target( target_client: &Client, ) -> anyhow::Result> { Ok(read_client_state::( - &target_client, + target_client, None, P::SourceChain::BEST_FINALIZED_HEADER_ID_METHOD, ) @@ -346,7 +346,7 @@ async fn find_mandatory_headers_in_range( let mut mandatory_headers = Vec::new(); let mut current = range.0; while current <= range.1 { - let (header, proof) = finality_source.header_and_finality_proof(current).await?.into(); + let (header, proof) = finality_source.header_and_finality_proof(current).await?; if header.is_mandatory() { match proof { Some(proof) => mandatory_headers.push((header, proof)), @@ -412,7 +412,7 @@ fn make_mandatory_headers_batches< } else { current_batch_size = new_batch_size; current_batch_weight = new_batch_weight; - i = i + 1; + i += 1; } } if !headers_to_submit.is_empty() { diff --git a/bridges/relays/bin-substrate/src/cli/send_message.rs b/bridges/relays/bin-substrate/src/cli/send_message.rs index 372ce1fa2a..42b2886b7c 100644 --- a/bridges/relays/bin-substrate/src/cli/send_message.rs +++ b/bridges/relays/bin-substrate/src/cli/send_message.rs @@ -18,7 +18,7 @@ use crate::cli::{ bridge::FullBridge, encode_call::{self, CliEncodeCall}, estimate_fee::estimate_message_delivery_and_dispatch_fee, - Balance, CliChain, ExplicitOrMaximal, HexBytes, HexLaneId, Origins, SourceConnectionParams, + Balance, ExplicitOrMaximal, HexBytes, HexLaneId, Origins, SourceConnectionParams, SourceSigningParams, TargetConnectionParams, TargetSigningParams, }; use bp_message_dispatch::{CallOrigin, MessagePayload}; @@ -304,6 +304,7 @@ pub(crate) fn compute_maximal_message_dispatch_weight(maximal_extrinsic_weight: #[cfg(test)] mod tests { use super::*; + use crate::cli::CliChain; use hex_literal::hex; #[async_std::test] diff --git a/bridges/relays/lib-substrate-relay/src/helpers.rs b/bridges/relays/lib-substrate-relay/src/helpers.rs index f95a8e0aba..6f30a5d468 100644 --- a/bridges/relays/lib-substrate-relay/src/helpers.rs +++ b/bridges/relays/lib-substrate-relay/src/helpers.rs @@ -23,7 +23,7 @@ pub fn token_price_metric(token_id: &str) -> Result( spec_version: u32, transaction_version: u32, @@ -443,7 +444,7 @@ where peer_client.header_by_number(peer_on_self_best_finalized_id.0).await?; HeaderId(peer_on_self_best_finalized_id.0, actual_peer_on_self_best_finalized.hash()) }, - None => peer_on_self_best_finalized_id.clone(), + None => peer_on_self_best_finalized_id, }; Ok(ClientState {