Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lesniak43 committed Oct 8, 2024
1 parent 7461c91 commit f7af9c7
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions bin/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1606,8 +1606,6 @@ mod tests {
assert!(lhs < rhs);
}

/// `EraPayout::era_payout` ignores the first argument, we set it to zero.
const DUMMY_TOTAL_STAKED: Balance = 0;
const MILLISECS_PER_DAY: u64 = 24 * 60 * 60 * 1000;

struct EraPayoutInputs {
Expand All @@ -1628,11 +1626,7 @@ mod tests {
pallet_aleph::AzeroCap::<Runtime>::put(inputs.azero_cap);
pallet_aleph::ExponentialInflationHorizon::<Runtime>::put(inputs.horizon);
let (validators_payout, rest) =
<Runtime as pallet_staking::Config>::EraPayout::era_payout(
DUMMY_TOTAL_STAKED,
inputs.total_issuance,
inputs.era_duration_millis,
);
ExponentialEraPayout::era_payout(inputs.total_issuance, inputs.era_duration_millis);
assert_eq!(validators_payout, outputs.validators_payout);
assert_eq!(rest, outputs.rest);
});
Expand All @@ -1650,11 +1644,7 @@ mod tests {
pallet_aleph::AzeroCap::<Runtime>::put(inputs.azero_cap);
pallet_aleph::ExponentialInflationHorizon::<Runtime>::put(inputs.horizon);
let (validators_payout, rest) =
<Runtime as pallet_staking::Config>::EraPayout::era_payout(
DUMMY_TOTAL_STAKED,
total_issuance,
inputs.era_duration_millis,
);
ExponentialEraPayout::era_payout(total_issuance, inputs.era_duration_millis);
outputs.push(EraPayoutOutputs {
validators_payout,
rest,
Expand Down

0 comments on commit f7af9c7

Please sign in to comment.