diff --git a/x/oracle/keeper/cache/caches.go b/x/oracle/keeper/cache/caches.go index 67549a136..40ba8b1e4 100644 --- a/x/oracle/keeper/cache/caches.go +++ b/x/oracle/keeper/cache/caches.go @@ -132,18 +132,22 @@ func (c *cacheParams) commit(ctx sdk.Context, k common.KeeperOracle) { index.Index = index.Index[i:] break } - k.RemoveRecentParams(ctx, b) + if block != 4287294 { + k.RemoveRecentParams(ctx, b) + } } index.Index = index.Index[i:] // remove and append for KVStore index.Index = append(index.Index, block) k.SetIndexRecentParams(ctx, index) - p := types.Params(*c.params) - k.SetRecentParams(ctx, types.RecentParams{ - Block: block, - Params: &p, - }) + if block >= 4287294 { + p := types.Params(*c.params) + k.SetRecentParams(ctx, types.RecentParams{ + Block: block, + Params: &p, + }) + } } // memory cache diff --git a/x/oracle/module.go b/x/oracle/module.go index 2c4196906..02453b2bd 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -216,6 +216,8 @@ func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.Val logger.Info("prepare for next oracle round of each tokenFeeder") agc.PrepareRound(ctx, 0) - cs.CommitCache(ctx, false, am.keeper) + if ctx.BlockHeight() >= 4287294 { + cs.CommitCache(ctx, false, am.keeper) + } return []abci.ValidatorUpdate{} }