Skip to content

Commit

Permalink
Update from bkontur running command 'fmt'
Browse files Browse the repository at this point in the history
  • Loading branch information
command-bot committed Dec 22, 2024
1 parent 8e681fb commit 69e85cc
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 19 deletions.
6 changes: 4 additions & 2 deletions bridges/modules/xcm-bridge-hub/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ impl crate::benchmarking::Config<()> for TestRuntime {
/// the `MessageExporter`. This means that the router sends an `ExportMessage`.
pub type XcmOverBridgeWrappedWithExportMessageRouterInstance = ();
#[derive_impl(pallet_xcm_bridge_hub_router::config_preludes::TestDefaultConfig)]
impl pallet_xcm_bridge_hub_router::Config<XcmOverBridgeWrappedWithExportMessageRouterInstance> for TestRuntime {
impl pallet_xcm_bridge_hub_router::Config<XcmOverBridgeWrappedWithExportMessageRouterInstance>
for TestRuntime
{
// We use `SovereignPaidRemoteExporter` here to test and ensure that the `ExportMessage`
// produced by `pallet_xcm_bridge_hub_router` is compatible with the `ExportXcm` implementation
// of `pallet_xcm_bridge_hub`.
Expand Down Expand Up @@ -562,7 +564,7 @@ impl Convert<Vec<u8>, Xcm<()>> for UpdateBridgeStatusXcmProvider {
Transact {
origin_kind: OriginKind::Xcm,
fallback_max_weight: Some(Weight::from_parts(200_000_000, 6144)),
call: encoded_call.into()
call: encoded_call.into(),
},
ExpectTransactStatus(MaybeErrorCode::Success),
])
Expand Down
2 changes: 1 addition & 1 deletion bridges/primitives/xcm-bridge-hub-router/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ pub enum XcmBridgeHubRouterCall<BridgeId> {
/// `pallet-xcm-bridge-hub-router::Call::report_bridge_status`
#[codec(index = 0)]
report_bridge_status { bridge_id: BridgeId, is_congested: bool },
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1251,11 +1251,9 @@ mod asset_hub_rococo_tests {
XcmConfig,
LocationToAccountId,
ToWestendXcmRouterInstance,
>(
collator_session_keys(),
bridging_to_asset_hub_westend,
|bridge_id, is_congested| bp_asset_hub_rococo::build_congestion_message(bridge_id.inner(), is_congested).into(),
)
>(collator_session_keys(), bridging_to_asset_hub_westend, |bridge_id, is_congested| {
bp_asset_hub_rococo::build_congestion_message(bridge_id.inner(), is_congested).into()
})
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1258,11 +1258,9 @@ fn update_bridge_status_from_xcm_bridge_router_for_rococo_works() {
XcmConfig,
LocationToAccountId,
ToRococoXcmRouterInstance,
>(
collator_session_keys(),
bridging_to_asset_hub_rococo,
|bridge_id, is_congested| bp_asset_hub_westend::build_congestion_message(bridge_id.inner(), is_congested).into()
)
>(collator_session_keys(), bridging_to_asset_hub_rococo, |bridge_id, is_congested| {
bp_asset_hub_westend::build_congestion_message(bridge_id.inner(), is_congested).into()
})
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@ pub fn update_bridge_status_from_xcm_bridge_router_works<
assert_ne!(is_congested_after, is_congested_before,);

// TODO:revert-for-depracated-old
// assert_eq!(is_congested, pallet_xcm_bridge_hub_router::Pallet::<Runtime, XcmBridgeHubRouterInstance>::bridge().is_congested);
// assert_eq!(is_congested, pallet_xcm_bridge_hub_router::Pallet::<Runtime,
// XcmBridgeHubRouterInstance>::bridge().is_congested);
};

update_bridge_status(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use crate::{
bridge_common_config::RelayersForPermissionlessLanesInstance, weights,
xcm_config::UniversalLocation, AccountId, Balance, Balances, BridgeRococoBulletinGrandpa,
BridgeRococoBulletinMessages, Runtime, RuntimeEvent, RuntimeHoldReason, XcmOverRococoBulletin,
BridgeRococoBulletinMessages, Runtime, RuntimeEvent, RuntimeHoldReason, XcmOverRococoBulletin,
XcmRouter,
};
use bp_messages::{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ impl Convert<Vec<u8>, Xcm<()>> for UpdateBridgeStatusXcmProvider {
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact {
origin_kind: OriginKind::Xcm,
fallback_max_weight: Some(bp_asset_hub_rococo::XcmBridgeHubRouterTransactCallMaxWeight::get()),
call: encoded_call.into()
fallback_max_weight: Some(
bp_asset_hub_rococo::XcmBridgeHubRouterTransactCallMaxWeight::get(),
),
call: encoded_call.into(),
},
ExpectTransactStatus(MaybeErrorCode::Success),
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ impl Convert<Vec<u8>, Xcm<()>> for UpdateBridgeStatusXcmProvider {
UnpaidExecution { weight_limit: Unlimited, check_origin: None },
Transact {
origin_kind: OriginKind::Xcm,
fallback_max_weight: Some(bp_asset_hub_westend::XcmBridgeHubRouterTransactCallMaxWeight::get()),
call: encoded_call.into()
fallback_max_weight: Some(
bp_asset_hub_westend::XcmBridgeHubRouterTransactCallMaxWeight::get(),
),
call: encoded_call.into(),
},
ExpectTransactStatus(MaybeErrorCode::Success),
])
Expand Down

0 comments on commit 69e85cc

Please sign in to comment.