Get dispatch weight from the target chain (when DispatchFeePayment::AtTargetChain is used) (#1430)

* reintroduce From<SourceChain>InboundLaneApi

* impl From<Chain>InboundLaneApi for testnet runtimes

* use inboundlaneapi in relay

* remove unused OutboundXcmWeigher

* spelling

* added the only test to messages pallet

* fmt
This commit is contained in:
Svyatoslav Nikolsky
2022-06-01 13:00:59 +03:00
committed by Bastian Köcher
parent 78a43c561a
commit f0d05de080
25 changed files with 411 additions and 89 deletions
+13 -3
View File
@@ -893,15 +893,25 @@ impl_runtime_apis! {
lane: bp_messages::LaneId,
begin: bp_messages::MessageNonce,
end: bp_messages::MessageNonce,
) -> Vec<bp_messages::MessageDetails<Balance>> {
) -> Vec<bp_messages::OutboundMessageDetails<Balance>> {
bridge_runtime_common::messages_api::outbound_message_details::<
Runtime,
WithMillauMessagesInstance,
WithMillauMessageBridge,
xcm_config::OutboundXcmWeigher,
>(lane, begin, end)
}
}
impl bp_millau::FromMillauInboundLaneApi<Block, bp_millau::Balance> for Runtime {
fn message_details(
lane: bp_messages::LaneId,
messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails<bp_millau::Balance>)>,
) -> Vec<bp_messages::InboundMessageDetails> {
bridge_runtime_common::messages_api::inbound_message_details::<
Runtime,
WithMillauMessagesInstance,
>(lane, messages)
}
}
}
#[cfg(test)]
@@ -122,8 +122,6 @@ pub type Barrier = (
AllowKnownQueryResponses<XcmPallet>,
);
/// Outbound XCM weigher type.
pub type OutboundXcmWeigher = xcm_builder::FixedWeightBounds<BaseXcmWeight, (), MaxInstructions>;
/// Incoming XCM weigher type.
pub type XcmWeigher = xcm_builder::FixedWeightBounds<BaseXcmWeight, Call, MaxInstructions>;