-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: historacle avg prices #1725
Conversation
d16071e
to
0e83d83
Compare
Codecov Report
@@ Coverage Diff @@
## main #1725 +/- ##
==========================================
- Coverage 57.49% 57.48% -0.01%
==========================================
Files 76 77 +1
Lines 7935 8030 +95
==========================================
+ Hits 4562 4616 +54
- Misses 3024 3063 +39
- Partials 349 351 +2
|
for _, v := range k.StakingKeeper.GetBondedValidatorsByPower(ctx) { | ||
addr := v.GetOperator() | ||
validatorClaimMap[addr.String()] = types.NewClaim(v.GetConsensusPower(powerReduction), 0, 0, addr) | ||
if err := CalcPrices(ctx, params, k); err != nil { |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
// Slash oracle providers who missed voting over the threshold and | ||
// reset miss counters of all validators at the last block of slash window | ||
if k.IsPeriodLastBlock(ctx, params.SlashWindow) { | ||
k.SlashAndResetMissCounters(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
|
||
k.ClearExchangeRates(ctx) | ||
k.PruneAllPrices(ctx) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
I've added a sample test using |
757a62d
to
2cbfb9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes: #1722
Description
I'm thinking about moving the
AvgKeeper
to a separate package, eg:leverage/keeper/avgk
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...