weights v1.5: iteration 2 (#1613)

This commit is contained in:
Svyatoslav Nikolsky
2022-10-21 13:43:07 +03:00
committed by Bastian Köcher
parent 829b23c7cf
commit e97bb57564
15 changed files with 81 additions and 70 deletions
@@ -195,7 +195,7 @@ impl<SenderOrigin, Balance, Payload> MessagesBridge<SenderOrigin, Balance, Paylo
_message: Payload,
_delivery_and_dispatch_fee: Balance,
) -> Result<SendMessageArtifacts, Self::Error> {
Ok(SendMessageArtifacts { nonce: 0, weight: Weight::from_ref_time(0) })
Ok(SendMessageArtifacts { nonce: 0, weight: Weight::zero() })
}
}
@@ -220,7 +220,7 @@ pub trait OnDeliveryConfirmed {
#[impl_trait_for_tuples::impl_for_tuples(30)]
impl OnDeliveryConfirmed for Tuple {
fn on_messages_delivered(lane: &LaneId, messages: &DeliveredMessages) -> Weight {
let mut total_weight = Weight::from_ref_time(0);
let mut total_weight = Weight::zero();
for_tuples!(
#(
total_weight = total_weight.saturating_add(Tuple::on_messages_delivered(lane, messages));
@@ -238,7 +238,7 @@ pub trait OnMessageAccepted {
impl OnMessageAccepted for () {
fn on_messages_accepted(_lane: &LaneId, _message: &MessageNonce) -> Weight {
Weight::from_ref_time(0)
Weight::zero()
}
}