File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ const (
7676 FlagIAVLCacheSize = "iavl-cache-size"
7777 FlagDisableIAVLFastNode = "iavl-disable-fastnode"
7878 FlagIAVLSyncPruning = "iavl-sync-pruning"
79+ FlagIAVLXOptions = "iavlx-options"
7980 FlagShutdownGrace = "shutdown-grace"
8081
8182 // state sync-related flags
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package server
22
33import (
44 "context"
5+ "encoding/json"
56 "errors"
67 "fmt"
78 "io"
@@ -584,9 +585,18 @@ func DefaultBaseappOptions(appOpts types.AppOptions) []func(*baseapp.BaseApp) {
584585 baseapp .SetChainID (chainID ),
585586 baseapp .SetQueryGasLimit (cast .ToUint64 (appOpts .Get (FlagQueryGasLimit ))),
586587 func (bapp * baseapp.BaseApp ) {
588+ opts := & iavlx.Options {}
589+ optsJson , ok := appOpts .Get (FlagIAVLXOptions ).(string )
590+ if ok && optsJson != "" {
591+ err := json .Unmarshal ([]byte (optsJson ), opts )
592+ if err != nil {
593+ panic (fmt .Errorf ("failed to unmarshal iavlx options: %w" , err ))
594+ }
595+ }
596+
587597 db , err := iavlx .LoadDB (
588598 filepath .Join (homeDir , "data" , "iavlx" ),
589- & iavlx. Options {} ,
599+ opts ,
590600 bapp .Logger (),
591601 )
592602 if err != nil {
You can’t perform that action at this time.
0 commit comments