Automated weights for message lane module (#590)

* automated weights

* associated WeightInfo type

* update weights using wasmtime

* disable clippy for autogenerated weight.rs

* fix
This commit is contained in:
Svyatoslav Nikolsky
2020-12-22 20:06:24 +03:00
committed by Bastian Köcher
parent c9310312b2
commit e5f6e309a6
5 changed files with 203 additions and 0 deletions
+4
View File
@@ -31,6 +31,7 @@
use crate::inbound_lane::{InboundLane, InboundLaneStorage};
use crate::outbound_lane::{OutboundLane, OutboundLaneStorage};
use crate::weights::WeightInfo;
use bp_message_lane::{
source_chain::{LaneMessageVerifier, MessageDeliveryAndDispatchPayment, TargetHeaderChain},
@@ -54,6 +55,7 @@ mod inbound_lane;
mod outbound_lane;
pub mod instant_payments;
pub mod weights;
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarking;
@@ -75,6 +77,8 @@ pub trait Config<I = DefaultInstance>: frame_system::Config {
/// They overarching event type.
type Event: From<Event<Self, I>> + Into<<Self as frame_system::Config>::Event>;
/// Benchmarks results from runtime we're plugged into.
type WeightInfo: WeightInfo;
/// Maximal number of messages that may be pruned during maintenance. Maintenance occurs
/// whenever new message is sent. The reason is that if you want to use lane, you should
/// be ready to pay for its maintenance.