From 5fde47d616c6426cd7946add8d7eec020eba66b7 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Sat, 26 Aug 2023 09:52:05 -0500 Subject: [PATCH] panic catch superfluid errors (#6175) * Panic catch superfluid errors * Change where we apply errcheck --- x/superfluid/keeper/epoch.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x/superfluid/keeper/epoch.go b/x/superfluid/keeper/epoch.go index fd5408d076b..9ca871e64c2 100644 --- a/x/superfluid/keeper/epoch.go +++ b/x/superfluid/keeper/epoch.go @@ -32,7 +32,11 @@ func (k Keeper) AfterEpochStartBeginBlock(ctx sdk.Context) { k.MoveSuperfluidDelegationRewardToGauges(ctx) ctx.Logger().Info("Distribute Superfluid gauges") - k.distributeSuperfluidGauges(ctx) + //nolint:errcheck + osmoutils.ApplyFuncIfNoError(ctx, func(cacheCtx sdk.Context) error { + k.distributeSuperfluidGauges(cacheCtx) + return nil + }) // Update all LP tokens multipliers for the upcoming epoch. // This affects staking reward distribution until the next epochs rewards.