Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
p0p3yee committed Oct 24, 2024
1 parent 1af6c20 commit 35d19c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions x/keyshare/keeper/msg_override_pubkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (k msgServer) OverrideLatestPubkey(
encSharesExistsValidators[encShare.Validator] = true
}

// Remove all validators in the set that not in the current epoch
for _, v := range allValidatorSet {
if _, exists := encSharesExistsValidators[v.Validator]; !exists {
k.RemoveValidatorSet(ctx, v.Validator)
Expand Down
3 changes: 3 additions & 0 deletions x/keyshare/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ func (am AppModule) BeginBlock(cctx context.Context) error {
for _, v := range qk.EncryptedKeyshares {
am.keeper.SetLastSubmittedHeight(ctx, v.Validator, strconv.FormatInt(ctx.BlockHeight(), 10))
}

// We don't need to remove the validators that not in the new round from the set
// They won't be slashed because of the new slashing idle validators logic
}
am.keeper.DeleteQueuedPubkey(ctx)
am.pepKeeper.DeleteQueuedPubkey(ctx)
Expand Down

0 comments on commit 35d19c0

Please sign in to comment.