diff --git a/config/config.go b/config/config.go index c34e18e8..05a6c696 100644 --- a/config/config.go +++ b/config/config.go @@ -129,7 +129,8 @@ type Config struct { CacheDatabase int `long:"cache.database" description:"Percentage of cache memory allowance to use for database io"` CacheSnapshot int `long:"cache.snapshot" description:"Percentage of cache memory allowance to use for snapshot caching (default = 10% full mode, 20% archive mode)"` - EVMTrieTimeout int `long:"evmtrietimeout" description:"Set the interval time(seconds) for flush evm trie to disk"` + EVMTrieTimeout int `long:"evmtrietimeout" description:"Set the interval time(seconds) for flush evm trie to disk"` + StateScheme string `long:"state.scheme" description:"Scheme to use for storing ethereum state ('hash' or 'path')"` // TODO: It will soon be discarded in the near future DevNextGDB bool `long:"devnextgdb" description:"Enable next generation databases that only exist in development mode"` // wallet diff --git a/meerevm/meer/config.go b/meerevm/meer/config.go index 8132e6d1..1352e17e 100644 --- a/meerevm/meer/config.go +++ b/meerevm/meer/config.go @@ -67,6 +67,9 @@ func MakeConfig(cfg *config.Config) (*eth.Config, error) { if cfg.EVMTrieTimeout > 0 { econfig.TrieTimeout = time.Second * time.Duration(cfg.EVMTrieTimeout) } + if len(cfg.StateScheme) > 0 { + econfig.StateScheme = cfg.StateScheme + } nodeConf := node.DefaultConfig diff --git a/services/common/load.go b/services/common/load.go index 4fff8171..bd9f772a 100644 --- a/services/common/load.go +++ b/services/common/load.go @@ -627,6 +627,11 @@ var ( Usage: "Set the interval time(seconds) for flush evm trie to disk", Destination: &cfg.EVMTrieTimeout, }, + &cli.StringFlag{ + Name: "state.scheme", + Usage: "Scheme to use for storing ethereum state ('hash' or 'path')", + Destination: &cfg.StateScheme, + }, } )