Add messages count parameter to delivery transaction (#581)

* add messages count parameter to delivery transaction

* fix benchmarks compilation
This commit is contained in:
Svyatoslav Nikolsky
2020-12-17 12:47:45 +03:00
committed by Bastian Köcher
parent 6317a31e25
commit 63e2655c8b
13 changed files with 96 additions and 71 deletions
-3
View File
@@ -420,8 +420,6 @@ parameter_types! {
bp_millau::MAX_UNREWARDED_RELAYER_ENTRIES_AT_INBOUND_LANE;
pub const MaxUnconfirmedMessagesAtInboundLane: bp_message_lane::MessageNonce =
bp_rialto::MAX_UNCONFIRMED_MESSAGES_AT_INBOUND_LANE;
pub const MaxMessagesInDeliveryTransaction: bp_message_lane::MessageNonce =
bp_rialto::MAX_MESSAGES_IN_DELIVERY_TRANSACTION;
}
pub(crate) type WithMillauMessageLaneInstance = pallet_message_lane::DefaultInstance;
@@ -430,7 +428,6 @@ impl pallet_message_lane::Config for Runtime {
type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce;
type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane;
type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane;
type MaxMessagesInDeliveryTransaction = MaxMessagesInDeliveryTransaction;
type OutboundPayload = crate::millau_messages::ToMillauMessagePayload;
type OutboundMessageFee = Balance;
@@ -192,8 +192,8 @@ impl SourceHeaderChain<bp_millau::Balance> for Millau {
fn verify_messages_proof(
proof: Self::MessagesProof,
max_messages: MessageNonce,
messages_count: MessageNonce,
) -> Result<ProvedMessages<Message<bp_millau::Balance>>, Self::Error> {
messages::target::verify_messages_proof::<WithMillauMessageBridge, Runtime>(proof, max_messages)
messages::target::verify_messages_proof::<WithMillauMessageBridge, Runtime>(proof, messages_count)
}
}