mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-12-01 06:49:56 +00:00
staking: Flexible generation of reward curve and associated tweaks (#8327)
* Initial abstraction * Alter rest of APIs * Fixes * Some extra getters in Gilt pallet. * Refactor Gilt to avoid u128 conversions * Simplify and improve pow in per_things * Add scalar division to per_things * Renaming from_fraction -> from_float, drop _approximation * Fixes * Fixes * Fixes * Fixes * Make stuff build * Fixes * Fixes * Fixes * Fixes * Update .gitignore Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/gilt/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/gilt/src/mock.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Fixes * Fixes * Fixes Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
1 parent
b6c626399e
commit
363db4f086
32 files changed
+342
-226
No files matched your search
@@ -1095,7 +1095,7 @@ mod score {
|
||||
is_score_better(
|
||||
claim.clone(),
|
||||
initial.clone(),
|
||||
Perbill::from_rational_approximation(1u32, 10_000),
|
||||
Perbill::from_rational(1u32, 10_000),
|
||||
),
|
||||
true,
|
||||
);
|
||||
@@ -1104,7 +1104,7 @@ mod score {
|
||||
is_score_better(
|
||||
claim.clone(),
|
||||
initial.clone(),
|
||||
Perbill::from_rational_approximation(2u32, 10_000),
|
||||
Perbill::from_rational(2u32, 10_000),
|
||||
),
|
||||
true,
|
||||
);
|
||||
@@ -1113,7 +1113,7 @@ mod score {
|
||||
is_score_better(
|
||||
claim.clone(),
|
||||
initial.clone(),
|
||||
Perbill::from_rational_approximation(3u32, 10_000),
|
||||
Perbill::from_rational(3u32, 10_000),
|
||||
),
|
||||
true,
|
||||
);
|
||||
@@ -1122,7 +1122,7 @@ mod score {
|
||||
is_score_better(
|
||||
claim.clone(),
|
||||
initial.clone(),
|
||||
Perbill::from_rational_approximation(4u32, 10_000),
|
||||
Perbill::from_rational(4u32, 10_000),
|
||||
),
|
||||
true,
|
||||
);
|
||||
@@ -1131,7 +1131,7 @@ mod score {
|
||||
is_score_better(
|
||||
claim.clone(),
|
||||
initial.clone(),
|
||||
Perbill::from_rational_approximation(5u32, 10_000),
|
||||
Perbill::from_rational(5u32, 10_000),
|
||||
),
|
||||
false,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user