From b6c913d5603fd885f9317539d23bc6657e2bbc38 Mon Sep 17 00:00:00 2001 From: Guantong <04637@163.com> Date: Thu, 29 Sep 2022 12:28:19 +0800 Subject: [PATCH] use `PANGOLIN_PANGOLIN_PARACHAIN_LANE` from `bridge_runtime_common` (#151) --- .../pangolin-parachain/src/bridges_message/pangolin.rs | 8 ++++---- runtime/pangolin-parachain/src/pallets/helixbridge.rs | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/runtime/pangolin-parachain/src/bridges_message/pangolin.rs b/runtime/pangolin-parachain/src/bridges_message/pangolin.rs index a4e37643..85c29928 100644 --- a/runtime/pangolin-parachain/src/bridges_message/pangolin.rs +++ b/runtime/pangolin-parachain/src/bridges_message/pangolin.rs @@ -12,7 +12,10 @@ use sp_std::ops::RangeInclusive; use crate::*; use bp_messages::{source_chain::*, target_chain::*, *}; use bp_runtime::*; -use bridge_runtime_common::messages::{self, source::*, target::*, BalanceOf, *}; +use bridge_runtime_common::{ + lanes::PANGOLIN_PANGOLIN_PARACHAIN_LANE, + messages::{self, source::*, target::*, BalanceOf, *}, +}; use dp_common_runtime::FromThisChainMessageVerifier; use pallet_bridge_messages::EXPECTED_DEFAULT_MESSAGE_LENGTH; @@ -40,9 +43,6 @@ pub type FromPangolinMessageDispatch = pub const INITIAL_PANGOLIN_TO_PANGOLIN_PARACHAIN_CONVERSION_RATE: FixedU128 = FixedU128::from_inner(FixedU128::DIV); -/// Identifier of bridge between pangolin and pangolin parachain. -pub const PANGOLIN_PANGOLIN_PARACHAIN_LANE: [u8; 4] = *b"pali"; - frame_support::parameter_types! { /// PangolinParachain to Pangolin conversion rate. Initially we trate both tokens as equal. pub storage PangolinToPangolinParachainConversionRate: FixedU128 = INITIAL_PANGOLIN_TO_PANGOLIN_PARACHAIN_CONVERSION_RATE; diff --git a/runtime/pangolin-parachain/src/pallets/helixbridge.rs b/runtime/pangolin-parachain/src/pallets/helixbridge.rs index 0af0d661..c59e4c15 100644 --- a/runtime/pangolin-parachain/src/pallets/helixbridge.rs +++ b/runtime/pangolin-parachain/src/pallets/helixbridge.rs @@ -8,9 +8,8 @@ use crate::*; use bp_message_dispatch::CallOrigin; use bp_messages::{LaneId, MessageNonce}; use bp_runtime::{messages::DispatchFeePayment, ChainId, PANGOLIN_CHAIN_ID}; -use bridges_message::pangolin::{ - ToPangolinMessagePayload, PANGOLIN_PANGOLIN_PARACHAIN_LANE, PANGOLIN_S2S_BACKING_PALLET_INDEX, -}; +use bridge_runtime_common::lanes::PANGOLIN_PANGOLIN_PARACHAIN_LANE; +use bridges_message::pangolin::{ToPangolinMessagePayload, PANGOLIN_S2S_BACKING_PALLET_INDEX}; use dp_common_runtime::helixbridge::{CallParams, Config, CreatePayload, LatestMessageNoncer}; use frame_support::RuntimeDebug; use pallet_bridge_messages::{outbound_lane, Instance1 as WithPangolinMessages};