Skip to content

Commit

Permalink
[OTE-531] feat(OE): Move PruneRateLimit from EndBlocker to PrepareChe…
Browse files Browse the repository at this point in the history
…ckState (#1880)
  • Loading branch information
teddyding committed Jul 18, 2024
1 parent a41b706 commit 76aa8a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions protocol/x/clob/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ func EndBlocker(
processProposerMatchesEvents,
)

// Prune any rate limiting information that is no longer relevant.
keeper.PruneRateLimits(ctx)

// Emit relevant metrics at the end of every block.
metrics.SetGauge(
metrics.InsuranceFundBalance,
Expand All @@ -143,6 +140,9 @@ func PrepareCheckState(
log.BlockHeight, ctx.BlockHeight()+1,
)

// Prune any rate limiting information that is no longer relevant.
keeper.PruneRateLimits(ctx)

// Get the events generated from processing the matches in the latest block.
processProposerMatchesEvents := keeper.GetProcessProposerMatchesEvents(ctx)
if ctx.BlockHeight() != int64(processProposerMatchesEvents.BlockHeight) {
Expand Down

0 comments on commit 76aa8a9

Please sign in to comment.