From 78c24eb0cfefa54a7bdc0eed2f7f77d8deba866a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 14:04:56 +0200 Subject: [PATCH] fix: call `SetIAVLCacheSize` with the configured value in simapp (backport #13107) (#13108) * fix: call `SetIAVLCacheSize` with the configured value in simapp (#13107) * Call `SetIAVLCacheSize` with the configured value in simapp. * Update CHANGELOG.md (cherry picked from commit ab3334242ad29cfc989833b557e203aa45d6771c) # Conflicts: # CHANGELOG.md * Apply suggestions from code review Co-authored-by: yihuang --- CHANGELOG.md | 1 + server/start.go | 1 + simapp/simd/cmd/root.go | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6461297889d9..5fca889fdb89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements * (x/auth) [#13048](https://github.com/cosmos/cosmos-sdk/pull/13048) Add handling of AccountNumberStoreKeyPrefix to the simulation decoder. +* (simapp) [#13108](https://github.com/cosmos/cosmos-sdk/pull/13108) Call `SetIAVLCacheSize` with the configured value in simapp. ### Bug Fixes diff --git a/server/start.go b/server/start.go index e0a97bb931cf..c8d57f664c7f 100644 --- a/server/start.go +++ b/server/start.go @@ -57,6 +57,7 @@ const ( FlagPruningInterval = "pruning-interval" FlagIndexEvents = "index-events" FlagMinRetainBlocks = "min-retain-blocks" + FlagIAVLCacheSize = "iavl-cache-size" // state sync-related flags FlagStateSyncSnapshotInterval = "state-sync.snapshot-interval" diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index cb0d3f6e0c34..f659caab2b62 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -291,6 +291,7 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), baseapp.SetSnapshot(snapshotStore, snapshotOptions), + baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))), ) }