aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/utils')
-rw-r--r--cmd/utils/flags.go14
1 files changed, 4 insertions, 10 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 9e80bba60..c47301dfb 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -908,22 +908,16 @@ func SetupNetwork(ctx *cli.Context) {
params.TargetGasLimit = new(big.Int).SetUint64(ctx.GlobalUint64(TargetGasLimitFlag.Name))
}
-func ChainDbName(ctx *cli.Context) string {
- if ctx.GlobalBool(LightModeFlag.Name) {
- return "lightchaindata"
- } else {
- return "chaindata"
- }
-}
-
// MakeChainDatabase open an LevelDB using the flags passed to the client and will hard crash if it fails.
func MakeChainDatabase(ctx *cli.Context, stack *node.Node) ethdb.Database {
var (
cache = ctx.GlobalInt(CacheFlag.Name)
handles = makeDatabaseHandles()
- name = ChainDbName(ctx)
)
-
+ name := "chaindata"
+ if ctx.GlobalBool(LightModeFlag.Name) {
+ name = "lightchaindata"
+ }
chainDb, err := stack.OpenDatabase(name, cache, handles)
if err != nil {
Fatalf("Could not open database: %v", err)