Skip to content

Commit b072940

Browse files
authored
L1-289: Use consts for calcs (#1830)
1 parent e644730 commit b072940

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ impl_runtime_apis! {
12411241
}
12421242

12431243
fn current_era_payout() -> (Balance, Balance) {
1244-
const MILLISECONDS_PER_ERA: u64 = 1000 * 3600 * 24;
1244+
const MILLISECONDS_PER_ERA: u64 = MILLISECS_PER_BLOCK * (DEFAULT_SESSION_PERIOD * DEFAULT_SESSIONS_PER_ERA) as u64;
12451245
let total_issuance = pallet_balances::Pallet::<Runtime>::total_issuance();
12461246

12471247
ExponentialEraPayout::era_payout(total_issuance, MILLISECONDS_PER_ERA)

0 commit comments

Comments
 (0)