From b897f47c8185763b0fc717dc686ed850877ae450 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 14:04:15 +0200 Subject: [PATCH] fix: call `SetIAVLCacheSize` with the configured value in simapp (backport #13107) (#13109) * 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 # simapp/simd/cmd/root.go * fix conflicts 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 7fb92147a9dc..feaca9011e7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#12885](https://github.com/cosmos/cosmos-sdk/pull/12885) Amortize cost of processing cache KV store. * [#12970](https://github.com/cosmos/cosmos-sdk/pull/12970) Bump Tendermint to `v0.34.21` and IAVL to `v0.19.1`. * [#12693](https://github.com/cosmos/cosmos-sdk/pull/12693) Make sure the order of each node is consistent when emitting proto events. +* (simapp) [#13107](https://github.com/cosmos/cosmos-sdk/pull/13107) Call `SetIAVLCacheSize` with the configured value in simapp. ### Bug Fixes diff --git a/server/start.go b/server/start.go index a20f73f32978..6f59a75f691c 100644 --- a/server/start.go +++ b/server/start.go @@ -53,6 +53,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 2313b1769d58..3189241f9b8d 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -272,6 +272,7 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a baseapp.SetSnapshotStore(snapshotStore), baseapp.SetSnapshotInterval(cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval))), baseapp.SetSnapshotKeepRecent(cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent))), + baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))), ) }