From b072940af9b7295a141a89b943a29a74bb21c9f8 Mon Sep 17 00:00:00 2001 From: kostekIV <27210860+kostekIV@users.noreply.github.com> Date: Tue, 8 Oct 2024 10:19:33 +0100 Subject: [PATCH] L1-289: Use consts for calcs (#1830) --- bin/runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/runtime/src/lib.rs b/bin/runtime/src/lib.rs index 9529073b73..b757b38e8a 100644 --- a/bin/runtime/src/lib.rs +++ b/bin/runtime/src/lib.rs @@ -1241,7 +1241,7 @@ impl_runtime_apis! { } fn current_era_payout() -> (Balance, Balance) { - const MILLISECONDS_PER_ERA: u64 = 1000 * 3600 * 24; + const MILLISECONDS_PER_ERA: u64 = MILLISECS_PER_BLOCK * (DEFAULT_SESSION_PERIOD * DEFAULT_SESSIONS_PER_ERA) as u64; let total_issuance = pallet_balances::Pallet::::total_issuance(); ExponentialEraPayout::era_payout(total_issuance, MILLISECONDS_PER_ERA)