Skip to content

Commit

Permalink
Update keyshare module begin block logic
Browse files Browse the repository at this point in the history
  • Loading branch information
p0p3yee committed Jun 22, 2023
1 parent 1bef14d commit e1505c6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions x/keyshare/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,19 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {
}
}

if foundQk && foundQc {
if foundQk {
if qk.Expiry > height {
am.keeper.SetActiveCommitments(ctx, qc)
am.keeper.SetActivePubKey(ctx, types.ActivePubKey(qk))
am.pepKeeper.SetActivePubKey(ctx, peptypes.ActivePubKey(qk))
if foundQc {
am.keeper.SetActiveCommitments(ctx, qc)
}
}
am.keeper.DeleteQueuedPubKey(ctx)
am.pepKeeper.DeleteQueuedPubKey(ctx)
am.keeper.DeleteQueuedCommitments(ctx)
if foundQc {
am.keeper.DeleteQueuedCommitments(ctx)
}
}
}

Expand Down

0 comments on commit e1505c6

Please sign in to comment.