-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
chore: adding calls to util.Panic #1764
Conversation
if err := k.AccrueAllInterest(ctx); err != nil { | ||
panic(err) | ||
} | ||
util.Panic(k.SweepBadDebts(ctx)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
panic(err) | ||
} | ||
util.Panic(k.SweepBadDebts(ctx)) | ||
util.Panic(k.AccrueAllInterest(ctx)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
if err := keeper.ResetQuota(ctx); err != nil { | ||
panic(err) | ||
} | ||
util.Panic(keeper.ResetQuota(ctx)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
I think this PR is missing the file with |
Yes, just added missing file. |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #1764 +/- ##
==========================================
- Coverage 57.50% 55.98% -1.53%
==========================================
Files 77 84 +7
Lines 8034 8310 +276
==========================================
+ Hits 4620 4652 +32
- Misses 3063 3317 +254
+ Partials 351 341 -10
|
if err := k.AccrueAllInterest(ctx); err != nil { | ||
panic(err) | ||
} | ||
util.Panic(k.SweepBadDebts(ctx)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
panic(err) | ||
} | ||
util.Panic(k.SweepBadDebts(ctx)) | ||
util.Panic(k.AccrueAllInterest(ctx)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
panic(err) | ||
} | ||
err := EndBlocker(ctx, am.keeper) | ||
util.Panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
if err != nil { | ||
panic(err) | ||
} | ||
util.Panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
if err := keeper.ResetQuota(ctx); err != nil { | ||
panic(err) | ||
} | ||
util.Panic(keeper.ResetQuota(ctx)) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
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
Description
Simplify the "if err -> panic" code flows.
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...