1 parent 17b7cda commit ad272fbCopy full SHA for ad272fb
1 file changed
x/masterchef/keeper/abci.go
@@ -34,14 +34,16 @@ func (k Keeper) EndBlocker(ctx sdk.Context) error {
34
k.DeleteFeeInfo(ctx)
35
36
// distribute LP rewards
37
- err := k.ProcessLPRewardDistribution(ctx)
+ cacheCtx, write := ctx.CacheContext()
38
+ err := k.ProcessLPRewardDistribution(cacheCtx)
39
if err != nil {
40
ctx.Logger().Error(fmt.Sprintf("Failed to process lp rewards distribution: %s", err.Error()))
41
return err
42
+ } else {
43
+ write()
44
}
45
// distribute external rewards
46
k.ProcessExternalRewardsDistribution(ctx)
-
47
return nil
48
49
0 commit comments