Skip to content

Commit

Permalink
Use consts for calcs
Browse files Browse the repository at this point in the history
  • Loading branch information
kostekIV committed Oct 8, 2024
1 parent 739bf37 commit f85ee65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Runtime>::total_issuance();

ExponentialEraPayout::era_payout(total_issuance, MILLISECONDS_PER_ERA)
Expand Down

0 comments on commit f85ee65

Please sign in to comment.