Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Jan 18, 2023
1 parent 6318193 commit 4496728
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<u8>;

Expand Down
9 changes: 5 additions & 4 deletions parachains/runtimes/bridge-hubs/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -40,7 +40,7 @@ pub fn dummy_xcm() -> Xcm<()> {

pub fn wrap_as_dispatch_message(payload: Vec<u8>) -> DispatchMessage<Vec<u8>> {
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) },
}
}
Expand All @@ -59,8 +59,9 @@ macro_rules! grab_haul_blob (

struct $name;
impl HaulBlob for $name {
fn haul_blob(blob: Vec<u8>) {
fn haul_blob(blob: Vec<u8>) -> Result<(), HaulBlobError>{
$grabbed_payload.with(|rm| *rm.borrow_mut() = Some(blob));
Ok(())
}
}
}
Expand Down

0 comments on commit 4496728

Please sign in to comment.