From 4496728b3e7e78ebdb4442b102a5c5ac6c9d51db Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Thu, 19 Jan 2023 00:47:27 +0100 Subject: [PATCH] Fixes --- .../bridge-hub-rococo/src/bridge_common_config.rs | 1 - parachains/runtimes/bridge-hubs/test-utils/src/lib.rs | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs index 0cc7c119e55..0fcfdba10da 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_common_config.rs @@ -26,7 +26,6 @@ use scale_info::TypeInfo; use xcm::latest::prelude::*; use xcm_builder::{DispatchBlob, DispatchBlobError, HaulBlob, HaulBlobError}; -// TODO:check-parameter - we could possibly use BridgeMessage from xcm:v3 stuff /// PLain "XCM" payload, which we transfer through bridge pub type XcmAsPlainPayload = sp_std::prelude::Vec; diff --git a/parachains/runtimes/bridge-hubs/test-utils/src/lib.rs b/parachains/runtimes/bridge-hubs/test-utils/src/lib.rs index ec438829da3..ff9acd36f68 100644 --- a/parachains/runtimes/bridge-hubs/test-utils/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/test-utils/src/lib.rs @@ -16,7 +16,7 @@ use bp_messages::{ target_chain::{DispatchMessage, DispatchMessageData}, - MessageKey, + LaneId, MessageKey, }; use cumulus_primitives_core::{AbridgedHrmpChannel, ParaId, PersistedValidationData}; use cumulus_primitives_parachain_inherent::ParachainInherentData; @@ -30,7 +30,7 @@ use frame_support::{ use parachains_common::AccountId; use polkadot_parachain::primitives::{HrmpChannelId, RelayChainBlockNumber}; use xcm::{latest::prelude::*, prelude::XcmVersion}; -use xcm_builder::{HaulBlob, HaulBlobExporter}; +use xcm_builder::{HaulBlob, HaulBlobError, HaulBlobExporter}; use xcm_executor::traits::{validate_export, ExportXcm}; /// Dummy xcm @@ -40,7 +40,7 @@ pub fn dummy_xcm() -> Xcm<()> { pub fn wrap_as_dispatch_message(payload: Vec) -> DispatchMessage> { DispatchMessage { - key: MessageKey { lane_id: [0, 0, 0, 0], nonce: 1 }, + key: MessageKey { lane_id: LaneId([0, 0, 0, 0]), nonce: 1 }, data: DispatchMessageData { payload: Ok(payload) }, } } @@ -59,8 +59,9 @@ macro_rules! grab_haul_blob ( struct $name; impl HaulBlob for $name { - fn haul_blob(blob: Vec) { + fn haul_blob(blob: Vec) -> Result<(), HaulBlobError>{ $grabbed_payload.with(|rm| *rm.borrow_mut() = Some(blob)); + Ok(()) } } }