Skip to content

Commit

Permalink
Fix testnet runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Oct 26, 2024
1 parent 049d46a commit cbc6ae7
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
5 changes: 2 additions & 3 deletions bridges/modules/xcm-bridge-hub/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#![cfg(test)]

use crate as pallet_xcm_bridge_hub;
use std::marker::PhantomData;

use bp_messages::{
target_chain::{DispatchMessage, MessageDispatch},
Expand All @@ -33,7 +32,7 @@ use frame_support::{
};
use frame_support::traits::EitherOf;
use frame_support::traits::fungible::Mutate;
use frame_system::{EnsureRoot, EnsureRootWithSuccess};
use frame_system::EnsureRootWithSuccess;
use polkadot_parachain_primitives::primitives::Sibling;
use sp_core::H256;
use sp_runtime::{
Expand All @@ -44,7 +43,7 @@ use sp_runtime::{
use sp_std::cell::RefCell;
use xcm::prelude::*;
use xcm_builder::{AllowUnpaidExecutionFrom, DispatchBlob, DispatchBlobError, FixedWeightBounds, InspectMessageQueues, NetworkExportTable, NetworkExportTableItem, ParentIsPreset, SiblingParachainConvertsVia, SovereignPaidRemoteExporter, UnpaidLocalExporter};
use xcm_executor::traits::{ConvertLocation, ConvertOrigin};
use xcm_executor::traits::ConvertLocation;
use xcm_executor::XcmExecutor;

pub type AccountId = AccountId32;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ pub type Migrations = (
RocksDbWeight,
>,
pallet_bridge_relayers::migration::v1::MigrationToV1<Runtime, ()>,
pallet_xcm_bridge_hub::migration::v1::MigrationToV1<
Runtime,
bridge_to_westend_config::XcmOverBridgeHubWestendInstance,
>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ pub type Migrations = (
RocksDbWeight,
>,
pallet_bridge_relayers::migration::v1::MigrationToV1<Runtime, ()>,
pallet_xcm_bridge_hub::migration::v1::MigrationToV1<
Runtime,
bridge_to_rococo_config::XcmOverBridgeHubRococoInstance,
>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
snowbridge_pallet_system::migration::v0::InitializeOnUpgrade<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,11 +687,16 @@ pub fn open_and_close_bridge_works<Runtime, XcmOverBridgePalletInstance, Locatio
>>::AllowWithoutBridgeDeposit::contains(
locations.bridge_origin_relative_location()
) {
Zero::zero()
None
} else {
<Runtime as pallet_xcm_bridge_hub::Config<
let bridge_owner_account = LocationToAccountId::convert_location(&source)
.expect("valid location")
.into();
let deposit = <Runtime as pallet_xcm_bridge_hub::Config<
XcmOverBridgePalletInstance,
>>::BridgeDeposit::get()
>>::BridgeDeposit::get();

Some(bp_xcm_bridge_hub::Deposit::new(bridge_owner_account, deposit))
};

// check bridge/lane DOES not exist
Expand Down Expand Up @@ -741,9 +746,6 @@ pub fn open_and_close_bridge_works<Runtime, XcmOverBridgePalletInstance, Locatio
locations.bridge_destination_universal_location().clone().into()
),
state: BridgeState::Opened,
bridge_owner_account: LocationToAccountId::convert_location(&source)
.expect("valid location")
.into(),
deposit: expected_deposit,
lane_id: expected_lane_id
})
Expand Down
4 changes: 4 additions & 0 deletions prdoc/pr_6231.prdoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ crates:
- name: asset-hub-westend-runtime
bump: patch
- name: bp-xcm-bridge-hub
bump: major
- name: bridge-hub-rococo-runtime
bump: patch
- name: bridge-hub-westend-runtime
bump: patch

0 comments on commit cbc6ae7

Please sign in to comment.