@@ -125,7 +125,6 @@ import (
125125
126126 // this line is used by starport scaffolding # stargate/app/moduleImport
127127
128- "github.com/crypto-org-chain/cronos/store/rootmulti"
129128 "github.com/crypto-org-chain/cronos/v2/x/cronos"
130129 cronosclient "github.com/crypto-org-chain/cronos/v2/x/cronos/client"
131130 cronoskeeper "github.com/crypto-org-chain/cronos/v2/x/cronos/keeper"
@@ -150,11 +149,6 @@ const (
150149 //
151150 // NOTE: In the SDK, the default value is 255.
152151 AddrLen = 20
153-
154- FlagMemIAVL = "store.memiavl"
155- FlagAsyncWAL = "store.memiavl-async-wal"
156- // don't enable zero-copy together with inter-block cache.
157- FlagZeroCopy = "store.memiavl-zero-copy"
158152)
159153
160154// this line is used by starport scaffolding # stargate/wasm/app/enabledProposals
@@ -349,15 +343,7 @@ func New(
349343 cdc := encodingConfig .Amino
350344 interfaceRegistry := encodingConfig .InterfaceRegistry
351345
352- if cast .ToBool (appOpts .Get (FlagMemIAVL )) {
353- // cms must be overridden before the other options, because they may use the cms,
354- // FIXME we are assuming the cms won't be overridden by the other options, but we can't be sure.
355- cms := rootmulti .NewStore (filepath .Join (homePath , "data" , "memiavl.db" ), logger )
356- cms .SetAsyncWAL (cast .ToBool (appOpts .Get (FlagAsyncWAL )))
357- cms .SetZeroCopy (cast .ToBool (appOpts .Get (FlagZeroCopy )))
358- baseAppOptions = append ([]func (* baseapp.BaseApp ){setCMS (cms )}, baseAppOptions ... )
359- }
360-
346+ baseAppOptions = SetupMemIAVL (logger , homePath , appOpts , baseAppOptions )
361347 bApp := baseapp .NewBaseApp (Name , logger , db , encodingConfig .TxConfig .TxDecoder (), baseAppOptions ... )
362348
363349 bApp .SetCommitMultiStoreTracer (traceStore )
0 commit comments