Use TypedLaneId instead of LaneId (#1738)

* TypedLaneId -> LaneId

* fix benchmarks compilation
This commit is contained in:
Svyatoslav Nikolsky
2022-12-30 12:09:19 +03:00
committed by Bastian Köcher
parent 41daa32acb
commit 03425b33ae
20 changed files with 65 additions and 50 deletions
@@ -832,7 +832,7 @@ mod tests {
use crate::millau_messages::WeightCredit;
use bp_messages::{
target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch},
MessageKey,
LaneId, MessageKey,
};
use bp_runtime::messages::MessageDispatchResult;
use bridge_runtime_common::messages::target::FromBridgedChainMessageDispatch;
@@ -875,7 +875,7 @@ mod tests {
let xcm: Xcm<RuntimeCall> = vec![Instruction::Trap(42)].into();
let mut incoming_message = 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((location, xcm).into()) },
};
@@ -31,7 +31,7 @@ use bridge_runtime_common::messages::{self, MessageBridge};
use frame_support::{parameter_types, weights::Weight, RuntimeDebug};
/// Default lane that is used to send messages to Millau.
pub const XCM_LANE: LaneId = [0, 0, 0, 0];
pub const XCM_LANE: LaneId = LaneId([0, 0, 0, 0]);
/// Weight of 2 XCM instructions is for simple `Trap(42)` program, coming through bridge
/// (it is prepended with `UniversalOrigin` instruction). It is used just for simplest manual
/// tests, confirming that we don't break encoding somewhere between.