Skip to content

Commit

Permalink
Problem: new iavl indexes migration is slow and not optional (#714)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
yihuang committed Sep 22, 2022
1 parent 7482ef0 commit a48f617
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
### Improvements

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

*September 13, 2022*

Expand Down
6 changes: 2 additions & 4 deletions cmd/cronosd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,6 @@ type appCreator struct {
encCfg params.EncodingConfig
}

// missing flag from cosmos-sdk
const flagIAVLCacheSize = "iavl-cache-size"

// newApp is an AppCreator
func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application {
var cache sdk.MultiStorePersistentCache
Expand Down Expand Up @@ -271,7 +268,8 @@ 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(flagIAVLCacheSize))),
baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))),
baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagIAVLFastNode))),
)
}

Expand Down

0 comments on commit a48f617

Please sign in to comment.