-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
R4R: Add slashing to governance for non-voting validators #1859
Conversation
a70dcc8
to
e6cb420
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1859 +/- ##
===========================================
+ Coverage 63.5% 63.81% +0.31%
===========================================
Files 118 118
Lines 7006 7014 +8
===========================================
+ Hits 4449 4476 +27
+ Misses 2301 2284 -17
+ Partials 256 254 -2 |
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.
utACK (double-check comment though)
x/gov/handler.go
Outdated
@@ -137,11 +138,16 @@ func EndBlocker(ctx sdk.Context, keeper Keeper) (resTags sdk.Tags, nonVotingVals | |||
} | |||
keeper.SetProposal(ctx, activeProposal) | |||
|
|||
for _, valAddr := range nonVotingVals { | |||
val := keeper.ds.GetValidatorSet().Validator(ctx, valAddr) | |||
keeper.ds.GetValidatorSet().Slash(ctx, val.GetPubKey(), ctx.BlockHeight(), val.GetPower().RoundInt64(), keeper.GetTallyingProcedure(ctx).GovernancePenalty) |
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.
This will slash delegators too - intentional presumably?
Thanks, - tests looked good |
closes #1854
docs/
)PENDING.md
that include links to the relevant issue or PR that most accurately describes the change.cmd/gaia
andexamples/
For Admin Use: