fiox overflow when computing priority boost (#2587)

This commit is contained in:
Svyatoslav Nikolsky
2023-09-28 13:57:54 +03:00
committed by Bastian Köcher
parent a837f0f999
commit 59e433750a
2 changed files with 39 additions and 2 deletions
@@ -38,7 +38,7 @@ where
PriorityBoostPerMessage: Get<TransactionPriority>,
{
// we don't want any boost for transaction with single message => minus one
PriorityBoostPerMessage::get().saturating_mul(messages - 1)
PriorityBoostPerMessage::get().saturating_mul(messages.saturating_sub(1))
}
#[cfg(not(feature = "integrity-test"))]