Skip to content

Commit

Permalink
config support state.scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
lochjin committed Nov 29, 2023
1 parent 832580a commit 589ab87
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions meerevm/meer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions services/common/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
}
)

Expand Down

0 comments on commit 589ab87

Please sign in to comment.