-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor: simplify hooks implementation #13396
Conversation
@@ -24,7 +24,7 @@ | |||
keeper.RefundAndDeleteDeposits(ctx, proposal.Id) // refund deposit if proposal got removed without getting 100% of the proposal | |||
|
|||
// called when proposal become inactive | |||
keeper.AfterProposalFailedMinDeposit(ctx, proposal.Id) | |||
keeper.Hooks().AfterProposalFailedMinDeposit(ctx, proposal.Id) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
@@ -24,7 +24,7 @@ | |||
keeper.RefundAndDeleteDeposits(ctx, proposal.Id) // refund deposit if proposal got removed without getting 100% of the proposal | |||
|
|||
// called when proposal become inactive | |||
keeper.AfterProposalFailedMinDeposit(ctx, proposal.Id) | |||
keeper.Hooks().AfterProposalFailedMinDeposit(ctx, proposal.Id) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
@@ -104,7 +104,7 @@ | |||
keeper.RemoveFromActiveProposalQueue(ctx, proposal.Id, *proposal.VotingEndTime) | |||
|
|||
// when proposal become active | |||
keeper.AfterProposalVotingPeriodEnded(ctx, proposal.Id) | |||
keeper.Hooks().AfterProposalVotingPeriodEnded(ctx, proposal.Id) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
@@ -104,7 +104,7 @@ | |||
keeper.RemoveFromActiveProposalQueue(ctx, proposal.Id, *proposal.VotingEndTime) | |||
|
|||
// when proposal become active | |||
keeper.AfterProposalVotingPeriodEnded(ctx, proposal.Id) | |||
keeper.Hooks().AfterProposalVotingPeriodEnded(ctx, proposal.Id) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #13396 +/- ##
==========================================
- Coverage 55.87% 54.35% -1.53%
==========================================
Files 646 640 -6
Lines 54895 54820 -75
==========================================
- Hits 30675 29798 -877
- Misses 21762 22620 +858
+ Partials 2458 2402 -56
|
Description
Closes: #12079
keeper/hooks.go
when possibletypes/hooks.go
, agrees with Refactor to delete every modules keeper/hooks.go file #12079 (comment), I think reflection makes it less understandable than the current implementation.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...
!
in the type prefix if API or client breaking change