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
@@ -295,7 +295,7 @@ impl<P: MessageLane, Strategy: RelayStrategy, SC, TC> MessageDeliveryStrategy<P,
.source_queue()
.iter()
.flat_map(|(_, range)| range.values().map(|details| details.dispatch_weight))
.fold(Weight::from_ref_time(0), |total, weight| total.saturating_add(weight))
.fold(Weight::zero(), |total, weight| total.saturating_add(weight))
}
}