Skip to content

Commit d6457e8

Browse files
author
yihuang
authored
Problem: new iavl indexes migration is slow and not optional (#714) (#720)
* Problem: new iavl indexes migration is slow and not optional Closes: #712 Solution: - Integrate the option introduced in cosmos-sdk * Update CHANGELOG.md Signed-off-by: yihuang <huang@crypto.com> Signed-off-by: yihuang <huang@crypto.com> Signed-off-by: yihuang <huang@crypto.com>
1 parent 7981ed1 commit d6457e8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
### Improvements
1010

11+
- [cronos#720](https://github.com/crypto-org-chain/cronos/pull/720) Add option `iavl-disable-fastnode` to disable iavl fastnode indexing migration (backport #714).
1112
- [cronos#721](https://github.com/crypto-org-chain/cronos/pull/721) Integrate the file state streamer (backport #702).
1213

1314
*Sep 20, 2022*

cmd/cronosd/cmd/root.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,6 @@ type appCreator struct {
213213
encCfg params.EncodingConfig
214214
}
215215

216-
// missing flag from cosmos-sdk
217-
const flagIAVLCacheSize = "iavl-cache-size"
218-
219216
// newApp is an AppCreator
220217
func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application {
221218
var cache sdk.MultiStorePersistentCache
@@ -271,7 +268,8 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a
271268
baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))),
272269
baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))),
273270
baseapp.SetSnapshot(snapshotStore, snapshotOptions),
274-
baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(flagIAVLCacheSize))),
271+
baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))),
272+
baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagIAVLFastNode))),
275273
)
276274
}
277275

0 commit comments

Comments
 (0)