mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
Fix clippy warnings + try to enable proper (no-warning) clippy on CI (#1410)
* fix clippy warnings * try to reenable proper clippy on CI * fix clippy error * more Eqs * ignore clippy::derive-partial-eq-without-eq - clippy seems to be broken now :/
This commit is contained in:
committed by
Bastian Köcher
parent
542ebb5654
commit
7a92b40eab
@@ -283,9 +283,7 @@ parameter_types! {
|
||||
pub struct BeefyDummyDataProvider;
|
||||
|
||||
impl beefy_primitives::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider {
|
||||
fn extra_data() -> () {
|
||||
()
|
||||
}
|
||||
fn extra_data() {}
|
||||
}
|
||||
|
||||
impl pallet_beefy_mmr::Config for Runtime {
|
||||
|
||||
@@ -34,7 +34,9 @@ pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Pu
|
||||
}
|
||||
|
||||
/// The extensions for the [`ChainSpec`].
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension)]
|
||||
#[derive(
|
||||
Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ChainSpecGroup, ChainSpecExtension,
|
||||
)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct Extensions {
|
||||
/// The relay chain of the Parachain.
|
||||
|
||||
@@ -301,7 +301,7 @@ parameter_types! {
|
||||
pub const RelayLocation: MultiLocation = MultiLocation::parent();
|
||||
pub const RelayNetwork: NetworkId = NetworkId::Polkadot;
|
||||
pub RelayOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into();
|
||||
pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into()).into());
|
||||
pub UniversalLocation: InteriorMultiLocation = X1(Parachain(ParachainInfo::parachain_id().into()));
|
||||
}
|
||||
|
||||
/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
|
||||
|
||||
@@ -101,7 +101,7 @@ impl MessageBridge for WithMillauMessageBridge {
|
||||
bridged_to_this_conversion_rate_override: Option<FixedU128>,
|
||||
) -> bp_rialto_parachain::Balance {
|
||||
let conversion_rate = bridged_to_this_conversion_rate_override
|
||||
.unwrap_or_else(|| MillauToRialtoParachainConversionRate::get());
|
||||
.unwrap_or_else(MillauToRialtoParachainConversionRate::get);
|
||||
bp_rialto_parachain::Balance::try_from(conversion_rate.saturating_mul_int(bridged_balance))
|
||||
.unwrap_or(bp_rialto_parachain::Balance::MAX)
|
||||
}
|
||||
|
||||
@@ -297,9 +297,7 @@ parameter_types! {
|
||||
pub struct BeefyDummyDataProvider;
|
||||
|
||||
impl beefy_primitives::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider {
|
||||
fn extra_data() -> () {
|
||||
()
|
||||
}
|
||||
fn extra_data() {}
|
||||
}
|
||||
|
||||
impl pallet_beefy_mmr::Config for Runtime {
|
||||
|
||||
@@ -96,7 +96,7 @@ impl MessageBridge for WithMillauMessageBridge {
|
||||
bridged_to_this_conversion_rate_override: Option<FixedU128>,
|
||||
) -> bp_rialto::Balance {
|
||||
let conversion_rate = bridged_to_this_conversion_rate_override
|
||||
.unwrap_or_else(|| MillauToRialtoConversionRate::get());
|
||||
.unwrap_or_else(MillauToRialtoConversionRate::get);
|
||||
bp_rialto::Balance::try_from(conversion_rate.saturating_mul_int(bridged_balance))
|
||||
.unwrap_or(bp_rialto::Balance::MAX)
|
||||
}
|
||||
|
||||
@@ -297,8 +297,7 @@ mod tests {
|
||||
let mut incoming_message = DispatchMessage {
|
||||
key: MessageKey { lane_id: [0, 0, 0, 0], nonce: 1 },
|
||||
data: DispatchMessageData { payload: Ok((location, xcm).into()), fee: 0 },
|
||||
}
|
||||
.into();
|
||||
};
|
||||
|
||||
let dispatch_weight = MessageDispatcher::dispatch_weight(&mut incoming_message);
|
||||
assert_eq!(dispatch_weight, 1_000_000_000);
|
||||
|
||||
@@ -481,7 +481,7 @@ pub mod target {
|
||||
use super::*;
|
||||
|
||||
/// Decoded Bridged -> This message payload.
|
||||
#[derive(RuntimeDebug, PartialEq)]
|
||||
#[derive(RuntimeDebug, PartialEq, Eq)]
|
||||
pub struct FromBridgedChainMessagePayload<Call> {
|
||||
/// Data that is actually sent over the wire.
|
||||
pub xcm: (xcm::v3::MultiLocation, xcm::v3::Xcm<Call>),
|
||||
@@ -726,7 +726,7 @@ pub mod target {
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub(crate) enum MessageProofError {
|
||||
Empty,
|
||||
MessagesCountMismatch,
|
||||
@@ -944,7 +944,7 @@ pub mod xcm_copy {
|
||||
message: &mut Option<Xcm<()>>,
|
||||
) -> Result<((Vec<u8>, XcmHash), MultiAssets), SendError> {
|
||||
let bridged_network = BridgedNetwork::get();
|
||||
ensure!(&network == &bridged_network, SendError::NotApplicable);
|
||||
ensure!(network == bridged_network, SendError::NotApplicable);
|
||||
// We don't/can't use the `channel` for this adapter.
|
||||
let dest = destination.take().ok_or(SendError::MissingArgument)?;
|
||||
let universal_dest = match dest.pushed_front_with(GlobalConsensus(bridged_network)) {
|
||||
@@ -1030,13 +1030,13 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Decode, Encode, Clone)]
|
||||
#[derive(Debug, PartialEq, Eq, Decode, Encode, Clone)]
|
||||
struct ThisChainAccountId(u32);
|
||||
#[derive(Debug, PartialEq, Decode, Encode)]
|
||||
#[derive(Debug, PartialEq, Eq, Decode, Encode)]
|
||||
struct ThisChainSigner(u32);
|
||||
#[derive(Debug, PartialEq, Decode, Encode)]
|
||||
#[derive(Debug, PartialEq, Eq, Decode, Encode)]
|
||||
struct ThisChainSignature(u32);
|
||||
#[derive(Debug, PartialEq, Decode, Encode)]
|
||||
#[derive(Debug, PartialEq, Eq, Decode, Encode)]
|
||||
enum ThisChainCall {
|
||||
#[codec(index = 42)]
|
||||
Transfer,
|
||||
@@ -1056,13 +1056,13 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Decode, Encode)]
|
||||
#[derive(Debug, PartialEq, Eq, Decode, Encode)]
|
||||
struct BridgedChainAccountId(u32);
|
||||
#[derive(Debug, PartialEq, Decode, Encode)]
|
||||
#[derive(Debug, PartialEq, Eq, Decode, Encode)]
|
||||
struct BridgedChainSigner(u32);
|
||||
#[derive(Debug, PartialEq, Decode, Encode)]
|
||||
#[derive(Debug, PartialEq, Eq, Decode, Encode)]
|
||||
struct BridgedChainSignature(u32);
|
||||
#[derive(Debug, PartialEq, Decode, Encode)]
|
||||
#[derive(Debug, PartialEq, Eq, Decode, Encode)]
|
||||
enum BridgedChainCall {}
|
||||
#[derive(Clone, Debug)]
|
||||
struct BridgedChainOrigin;
|
||||
@@ -1079,7 +1079,7 @@ mod tests {
|
||||
|
||||
macro_rules! impl_wrapped_balance {
|
||||
($name:ident) => {
|
||||
#[derive(Debug, PartialEq, Decode, Encode, Clone, Copy)]
|
||||
#[derive(Debug, PartialEq, Eq, Decode, Encode, Clone, Copy)]
|
||||
struct $name(u32);
|
||||
|
||||
impl From<u32> for $name {
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
///
|
||||
/// ```nocompile
|
||||
/// pallet_bridge_grandpa::declare_check_bridged_block_number_ext!{
|
||||
/// Runtime,
|
||||
/// Call::BridgeRialtoGrandpa => RialtoGrandpaInstance,
|
||||
/// Call::BridgeWestendGrandpa => WestendGrandpaInstance,
|
||||
/// Runtime,
|
||||
/// Call::BridgeRialtoGrandpa => RialtoGrandpaInstance,
|
||||
/// Call::BridgeWestendGrandpa => WestendGrandpaInstance,
|
||||
/// }
|
||||
/// ```
|
||||
#[macro_export]
|
||||
|
||||
@@ -53,7 +53,7 @@ impl<H: HeaderT> crate::FinalityProof<H::Number> for GrandpaJustification<H> {
|
||||
}
|
||||
|
||||
/// Justification verification error.
|
||||
#[derive(RuntimeDebug, PartialEq)]
|
||||
#[derive(Eq, RuntimeDebug, PartialEq)]
|
||||
pub enum Error {
|
||||
/// Failed to decode justification.
|
||||
JustificationDecode,
|
||||
|
||||
@@ -38,7 +38,7 @@ pub trait Parameter: Codec + EncodeLike + Clone + Eq + Debug + TypeInfo {}
|
||||
impl<T> Parameter for T where T: Codec + EncodeLike + Clone + Eq + Debug + TypeInfo {}
|
||||
|
||||
/// A GRANDPA Authority List and ID.
|
||||
#[derive(Default, Encode, Decode, RuntimeDebug, PartialEq, Clone, TypeInfo)]
|
||||
#[derive(Default, Encode, Eq, Decode, RuntimeDebug, PartialEq, Clone, TypeInfo)]
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
|
||||
pub struct AuthoritySet {
|
||||
/// List of GRANDPA authorities for the current round.
|
||||
|
||||
@@ -173,7 +173,7 @@ impl<SenderOrigin, AccountId, Balance>
|
||||
}
|
||||
|
||||
/// Send message artifacts.
|
||||
#[derive(RuntimeDebug, PartialEq)]
|
||||
#[derive(Eq, RuntimeDebug, PartialEq)]
|
||||
pub struct SendMessageArtifacts {
|
||||
/// Nonce of the message.
|
||||
pub nonce: MessageNonce,
|
||||
@@ -198,7 +198,7 @@ pub trait MessagesBridge<SenderOrigin, AccountId, Balance, Payload> {
|
||||
}
|
||||
|
||||
/// Bridge that does nothing when message is being sent.
|
||||
#[derive(RuntimeDebug, PartialEq)]
|
||||
#[derive(Eq, RuntimeDebug, PartialEq)]
|
||||
pub struct NoopMessagesBridge;
|
||||
|
||||
impl<SenderOrigin, AccountId, Balance, Payload>
|
||||
|
||||
@@ -58,7 +58,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(RuntimeDebug, PartialEq)]
|
||||
#[derive(Eq, RuntimeDebug, PartialEq)]
|
||||
pub enum Error {
|
||||
StorageRootMismatch,
|
||||
StorageValueUnavailable,
|
||||
|
||||
@@ -74,7 +74,7 @@ macro_rules! select_full_bridge {
|
||||
|
||||
// Relay-messages
|
||||
#[allow(unused_imports)]
|
||||
use crate::chains::millau_messages_to_rialto::MillauMessagesToRialto as MessagesLane;
|
||||
use $crate::chains::millau_messages_to_rialto::MillauMessagesToRialto as MessagesLane;
|
||||
|
||||
// Send-message / Estimate-fee
|
||||
#[allow(unused_imports)]
|
||||
@@ -93,7 +93,7 @@ macro_rules! select_full_bridge {
|
||||
|
||||
// Relay-messages
|
||||
#[allow(unused_imports)]
|
||||
use crate::chains::rialto_messages_to_millau::RialtoMessagesToMillau as MessagesLane;
|
||||
use $crate::chains::rialto_messages_to_millau::RialtoMessagesToMillau as MessagesLane;
|
||||
|
||||
// Send-message / Estimate-fee
|
||||
#[allow(unused_imports)]
|
||||
@@ -112,7 +112,7 @@ macro_rules! select_full_bridge {
|
||||
|
||||
// Relay-messages
|
||||
#[allow(unused_imports)]
|
||||
use crate::chains::rococo_messages_to_wococo::RococoMessagesToWococo as MessagesLane;
|
||||
use $crate::chains::rococo_messages_to_wococo::RococoMessagesToWococo as MessagesLane;
|
||||
|
||||
// Send-message / Estimate-fee
|
||||
#[allow(unused_imports)]
|
||||
@@ -131,7 +131,7 @@ macro_rules! select_full_bridge {
|
||||
|
||||
// Relay-messages
|
||||
#[allow(unused_imports)]
|
||||
use crate::chains::wococo_messages_to_rococo::WococoMessagesToRococo as MessagesLane;
|
||||
use $crate::chains::wococo_messages_to_rococo::WococoMessagesToRococo as MessagesLane;
|
||||
|
||||
// Send-message / Estimate-fee
|
||||
#[allow(unused_imports)]
|
||||
@@ -150,7 +150,7 @@ macro_rules! select_full_bridge {
|
||||
|
||||
// Relay-messages
|
||||
#[allow(unused_imports)]
|
||||
use crate::chains::kusama_messages_to_polkadot::KusamaMessagesToPolkadot as MessagesLane;
|
||||
use $crate::chains::kusama_messages_to_polkadot::KusamaMessagesToPolkadot as MessagesLane;
|
||||
|
||||
// Send-message / Estimate-fee
|
||||
#[allow(unused_imports)]
|
||||
@@ -169,7 +169,7 @@ macro_rules! select_full_bridge {
|
||||
|
||||
// Relay-messages
|
||||
#[allow(unused_imports)]
|
||||
use crate::chains::polkadot_messages_to_kusama::PolkadotMessagesToKusama as MessagesLane;
|
||||
use $crate::chains::polkadot_messages_to_kusama::PolkadotMessagesToKusama as MessagesLane;
|
||||
|
||||
// Send-message / Estimate-fee
|
||||
#[allow(unused_imports)]
|
||||
@@ -188,7 +188,7 @@ macro_rules! select_full_bridge {
|
||||
|
||||
// Relay-messages
|
||||
#[allow(unused_imports)]
|
||||
use crate::chains::millau_messages_to_rialto_parachain::MillauMessagesToRialtoParachain as MessagesLane;
|
||||
use $crate::chains::millau_messages_to_rialto_parachain::MillauMessagesToRialtoParachain as MessagesLane;
|
||||
|
||||
// Send-message / Estimate-fee
|
||||
#[allow(unused_imports)]
|
||||
@@ -207,7 +207,7 @@ macro_rules! select_full_bridge {
|
||||
|
||||
// Relay-messages
|
||||
#[allow(unused_imports)]
|
||||
use crate::chains::rialto_parachain_messages_to_millau::RialtoParachainMessagesToMillau as MessagesLane;
|
||||
use $crate::chains::rialto_parachain_messages_to_millau::RialtoParachainMessagesToMillau as MessagesLane;
|
||||
|
||||
// Send-message / Estimate-fee
|
||||
#[allow(unused_imports)]
|
||||
|
||||
@@ -83,11 +83,9 @@ pub(crate) fn compute_maximal_message_size(
|
||||
bridge_runtime_common::messages::target::maximal_incoming_message_size(
|
||||
maximal_target_extrinsic_size,
|
||||
);
|
||||
let maximal_message_size = if maximal_message_size > maximal_source_extrinsic_size {
|
||||
if maximal_message_size > maximal_source_extrinsic_size {
|
||||
maximal_source_extrinsic_size
|
||||
} else {
|
||||
maximal_message_size
|
||||
};
|
||||
|
||||
maximal_message_size
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ const NEXT_FREE_PARA_ID_STORAGE_NAME: &str = "NextFreeParaId";
|
||||
const PARAS_LIFECYCLES_STORAGE_NAME: &str = "ParaLifecycles";
|
||||
|
||||
/// Register parachain.
|
||||
#[derive(StructOpt, Debug, PartialEq)]
|
||||
#[derive(StructOpt, Debug, PartialEq, Eq)]
|
||||
pub struct RegisterParachain {
|
||||
/// A parachain to register.
|
||||
#[structopt(possible_values = Parachain::VARIANTS, case_insensitive = true)]
|
||||
@@ -69,7 +69,7 @@ pub struct RegisterParachain {
|
||||
}
|
||||
|
||||
/// Parachain to register.
|
||||
#[derive(Debug, EnumString, EnumVariantNames, PartialEq)]
|
||||
#[derive(Debug, EnumString, EnumVariantNames, PartialEq, Eq)]
|
||||
#[strum(serialize_all = "kebab_case")]
|
||||
pub enum Parachain {
|
||||
RialtoParachain,
|
||||
|
||||
@@ -49,7 +49,7 @@ use substrate_relay_helper::{
|
||||
};
|
||||
|
||||
/// Reinitialize bridge pallet.
|
||||
#[derive(Debug, PartialEq, StructOpt)]
|
||||
#[derive(Debug, PartialEq, Eq, StructOpt)]
|
||||
pub struct ReinitBridge {
|
||||
/// A bridge instance to reinitialize.
|
||||
#[structopt(possible_values = ReinitBridgeName::VARIANTS, case_insensitive = true)]
|
||||
@@ -62,7 +62,7 @@ pub struct ReinitBridge {
|
||||
target_sign: TargetSigningParams,
|
||||
}
|
||||
|
||||
#[derive(Debug, EnumString, EnumVariantNames, PartialEq)]
|
||||
#[derive(Debug, EnumString, EnumVariantNames, PartialEq, Eq)]
|
||||
#[strum(serialize_all = "kebab_case")]
|
||||
/// Bridge to initialize.
|
||||
pub enum ReinitBridgeName {
|
||||
|
||||
@@ -29,7 +29,7 @@ use crate::{
|
||||
};
|
||||
|
||||
/// Relayer operating mode.
|
||||
#[derive(Debug, EnumString, EnumVariantNames, Clone, Copy, PartialEq)]
|
||||
#[derive(Debug, EnumString, EnumVariantNames, Clone, Copy, PartialEq, Eq)]
|
||||
#[strum(serialize_all = "kebab_case")]
|
||||
pub enum RelayerMode {
|
||||
/// The relayer doesn't care about rewards.
|
||||
|
||||
@@ -100,6 +100,7 @@ impl SendMessage {
|
||||
),
|
||||
};
|
||||
let payload_len = payload.encode().len();
|
||||
#[allow(clippy::useless_conversion)]
|
||||
let send_message_call = Source::encode_send_message_call(
|
||||
self.lane.0,
|
||||
payload,
|
||||
|
||||
@@ -31,7 +31,7 @@ use std::time::Duration;
|
||||
pub type HeaderId = relay_utils::HeaderId<millau_runtime::Hash, millau_runtime::BlockNumber>;
|
||||
|
||||
/// Millau chain definition.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Millau;
|
||||
|
||||
impl ChainBase for Millau {
|
||||
|
||||
@@ -32,7 +32,7 @@ use std::time::Duration;
|
||||
pub type HeaderId = relay_utils::HeaderId<rialto_runtime::Hash, rialto_runtime::BlockNumber>;
|
||||
|
||||
/// Rialto chain definition
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Rialto;
|
||||
|
||||
impl ChainBase for Rialto {
|
||||
|
||||
@@ -26,7 +26,7 @@ use frame_support::weights::{IdentityFee, Weight};
|
||||
use std::time::Duration;
|
||||
|
||||
/// Chain that may be used in tests.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct TestChain;
|
||||
|
||||
impl bp_runtime::Chain for TestChain {
|
||||
|
||||
@@ -70,7 +70,7 @@ impl FinalitySyncPipeline for TestFinalitySyncPipeline {
|
||||
type FinalityProof = TestFinalityProof;
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
struct TestSourceHeader(IsMandatory, TestNumber, TestHash);
|
||||
|
||||
impl SourceHeader<TestHash, TestNumber> for TestSourceHeader {
|
||||
@@ -87,7 +87,7 @@ impl SourceHeader<TestHash, TestNumber> for TestSourceHeader {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
struct TestFinalityProof(TestNumber);
|
||||
|
||||
impl FinalityProof<TestNumber> for TestFinalityProof {
|
||||
|
||||
@@ -62,7 +62,7 @@ pub struct Params<Strategy: RelayStrategy> {
|
||||
}
|
||||
|
||||
/// Relayer operating mode.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum RelayerMode {
|
||||
/// The relayer doesn't care about rewards.
|
||||
Altruistic,
|
||||
@@ -111,7 +111,7 @@ pub type MessageDetailsMap<SourceChainBalance> =
|
||||
BTreeMap<MessageNonce, MessageDetails<SourceChainBalance>>;
|
||||
|
||||
/// Message delivery race proof parameters.
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct MessageProofParameters {
|
||||
/// Include outbound lane state proof?
|
||||
pub outbound_state_proof_required: bool,
|
||||
|
||||
@@ -538,7 +538,7 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
struct TestParachainsPipeline;
|
||||
|
||||
impl ParachainsPipeline for TestParachainsPipeline {
|
||||
@@ -1022,13 +1022,13 @@ mod tests {
|
||||
stall_timeout: Duration::from_secs(60),
|
||||
};
|
||||
|
||||
assert_eq!(is_update_required(&sync_params, &[]), false);
|
||||
assert_eq!(is_update_required(&sync_params, &[ParaId(PARA_ID)]), true);
|
||||
assert_eq!(is_update_required(&sync_params, &[ParaId(PARA_ID), ParaId(PARA_1_ID)]), true);
|
||||
assert!(!is_update_required(&sync_params, &[]));
|
||||
assert!(is_update_required(&sync_params, &[ParaId(PARA_ID)]));
|
||||
assert!(is_update_required(&sync_params, &[ParaId(PARA_ID), ParaId(PARA_1_ID)]));
|
||||
|
||||
sync_params.strategy = ParachainSyncStrategy::All;
|
||||
assert_eq!(is_update_required(&sync_params, &[]), false);
|
||||
assert_eq!(is_update_required(&sync_params, &[ParaId(PARA_ID)]), false);
|
||||
assert_eq!(is_update_required(&sync_params, &[ParaId(PARA_ID), ParaId(PARA_1_ID)]), true);
|
||||
assert!(!is_update_required(&sync_params, &[]));
|
||||
assert!(!is_update_required(&sync_params, &[ParaId(PARA_ID)]));
|
||||
assert!(is_update_required(&sync_params, &[ParaId(PARA_ID), ParaId(PARA_1_ID)]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ pub fn interval(timeout: Duration) -> impl futures::Stream<Item = ()> {
|
||||
}
|
||||
|
||||
/// Which client has caused error.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
#[derive(Debug, Eq, Clone, Copy, PartialEq)]
|
||||
pub enum FailedClient {
|
||||
/// It is the source client who has caused error.
|
||||
Source,
|
||||
|
||||
@@ -201,7 +201,7 @@ impl<SC, TC, LM> LoopMetrics<SC, TC, LM> {
|
||||
},
|
||||
};
|
||||
|
||||
let _ = runtime.block_on(async move {
|
||||
runtime.block_on(async move {
|
||||
log::trace!(
|
||||
target: "bridge-metrics",
|
||||
"Starting prometheus endpoint at: {:?}",
|
||||
|
||||
Reference in New Issue
Block a user