mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 02:51:01 +00:00
Update polkadot inflation to take into account auctions (#5872)
* Update polkadot inflation to take into account auctions * a possible solution -- but needs a rather untrivial data seeding * some additional comments * Use LOWEST_PUBLIC_ID as a guide to filter out system/common good para ids * Fixes * move tests * fix Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -137,40 +137,6 @@ fn nominator_limit() {
|
||||
println!("can support {} nominators to yield a weight of {}", active, weight_with(active));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compute_inflation_should_give_sensible_results() {
|
||||
assert_eq!(
|
||||
pallet_staking_reward_fn::compute_inflation(
|
||||
Perquintill::from_percent(75),
|
||||
Perquintill::from_percent(75),
|
||||
Perquintill::from_percent(5),
|
||||
),
|
||||
Perquintill::one()
|
||||
);
|
||||
assert_eq!(
|
||||
pallet_staking_reward_fn::compute_inflation(
|
||||
Perquintill::from_percent(50),
|
||||
Perquintill::from_percent(75),
|
||||
Perquintill::from_percent(5),
|
||||
),
|
||||
Perquintill::from_rational(2u64, 3u64)
|
||||
);
|
||||
assert_eq!(
|
||||
pallet_staking_reward_fn::compute_inflation(
|
||||
Perquintill::from_percent(80),
|
||||
Perquintill::from_percent(75),
|
||||
Perquintill::from_percent(5),
|
||||
),
|
||||
Perquintill::from_rational(1u64, 2u64)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn era_payout_should_give_sensible_results() {
|
||||
assert_eq!(era_payout(75, 100, Perquintill::from_percent(10), Perquintill::one(), 0,), (10, 0));
|
||||
assert_eq!(era_payout(80, 100, Perquintill::from_percent(10), Perquintill::one(), 0,), (6, 4));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn call_size() {
|
||||
RuntimeCall::assert_size_under(230);
|
||||
|
||||
Reference in New Issue
Block a user