Skip to content

Commit

Permalink
Problem: new iavl indexes migration is slow and not optional (crypto-…
Browse files Browse the repository at this point in the history
…org-chain#714)

* Problem: new iavl indexes migration is slow and not optional

Closes: crypto-org-chain#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 26, 2022
1 parent 10bb672 commit 581bf3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- [cronos#719](https://github.com/crypto-org-chain/cronos/pull/719) Fix `eth_call` for legacy blocks (backport #713).

### Improvements

- [cronos#720](https://github.com/crypto-org-chain/cronos/pull/720) Add option `iavl-disable-fastnode` to disable iavl fastnode indexing migration (backport #714).

*Sep 20, 2022*

## v0.9.0-beta3
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 @@ -211,9 +211,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 @@ -269,7 +266,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 581bf3a

Please sign in to comment.