Return cumulative dispatch weight of messages from the messageLane_proveMessages (#469)

* implement OutboundLaneApi and InboundLaneApi for Millau /Rialto runtimes

* fixed typo
This commit is contained in:
Svyatoslav Nikolsky
2020-10-28 21:35:29 +03:00
committed by Bastian Köcher
parent 51f39c4427
commit ef9357596f
8 changed files with 129 additions and 12 deletions
+3 -1
View File
@@ -23,7 +23,7 @@
#![allow(clippy::unnecessary_mut_passed)]
use codec::{Decode, Encode};
use frame_support::RuntimeDebug;
use frame_support::{weights::Weight, RuntimeDebug};
use sp_api::decl_runtime_apis;
use sp_std::{collections::vec_deque::VecDeque, prelude::*};
@@ -126,6 +126,8 @@ impl Default for OutboundLaneData {
decl_runtime_apis! {
/// Outbound message lane API.
pub trait OutboundLaneApi {
/// Returns dispatch weight of all messages in given inclusive range.
fn messages_dispatch_weight(lane: LaneId, begin: MessageNonce, end: MessageNonce) -> Weight;
/// Returns nonce of the latest message, received by bridged chain.
fn latest_received_nonce(lane: LaneId) -> MessageNonce;
/// Returns nonce of the latest message, generated by given lane.