-
Notifications
You must be signed in to change notification settings - Fork 1
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!: x/slashing missed block window #1
Conversation
// determine if the validator signed the previous block | ||
previous, err := k.GetMissedBlockBitmapValue(ctx, consAddr, index) | ||
if err != nil { | ||
panic(errors.Wrap(err, "failed to get the validator's bitmap value")) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
// Bitmap value has changed from not missed to missed, so we flip the bit | ||
// and increment the counter. | ||
if err := k.SetMissedBlockBitmapValue(ctx, consAddr, index, true); err != nil { | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
// Bitmap value has changed from missed to not missed, so we flip the bit | ||
// and decrement the counter. | ||
if err := k.SetMissedBlockBitmapValue(ctx, consAddr, index, false); err != nil { | ||
panic(err) |
Check warning
Code scanning / CodeQL
Panic in BeginBock or EndBlock consensus methods
…BlockBitmap to keep compatibility for third-party projects
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.
Looks same as original PR, nothing bad found!
Backport of cosmos#15580 to Cosmos SDK 0.47