Skip to content

Commit 698adaf

Browse files
committed
suggestion
1 parent c454ef6 commit 698adaf

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

apps/evm/cmd/rollback.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func NewRollbackCmd() *cobra.Command {
3838
}
3939

4040
// evolve db
41-
rawEvolveDB, err := store.NewDefaultKVStore(nodeConfig.RootDir, nodeConfig.DBPath, "evm-single")
41+
rawEvolveDB, err := store.NewDefaultKVStore(nodeConfig.RootDir, nodeConfig.DBPath, evmDbName)
4242
if err != nil {
4343
return err
4444
}

apps/evm/cmd/run.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ import (
2828
"github.com/evstack/ev-node/sequencers/single"
2929
)
3030

31+
const evmDbName = "evm-single"
32+
3133
var RunCmd = &cobra.Command{
3234
Use: "start",
3335
Aliases: []string{"node", "run"},
@@ -60,7 +62,7 @@ var RunCmd = &cobra.Command{
6062
return err
6163
}
6264

63-
datastore, err := store.NewDefaultKVStore(nodeConfig.RootDir, nodeConfig.DBPath, "evm-single")
65+
datastore, err := store.NewDefaultKVStore(nodeConfig.RootDir, nodeConfig.DBPath, evmDbName)
6466
if err != nil {
6567
return err
6668
}

apps/grpc/cmd/run.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
)
2727

2828
const (
29+
grpcDbName = "grpc-single"
2930
// FlagGrpcExecutorURL is the flag for the gRPC executor endpoint
3031
FlagGrpcExecutorURL = "grpc-executor-url"
3132
)
@@ -63,7 +64,7 @@ The execution client must implement the Evolve execution gRPC interface.`,
6364
}
6465

6566
// Create datastore
66-
datastore, err := store.NewDefaultKVStore(nodeConfig.RootDir, nodeConfig.DBPath, "grpc-single")
67+
datastore, err := store.NewDefaultKVStore(nodeConfig.RootDir, nodeConfig.DBPath, grpcDbName)
6768
if err != nil {
6869
return err
6970
}

apps/testapp/cmd/rollback.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func NewRollbackCmd() *cobra.Command {
3939
}
4040

4141
// evolve db
42-
rawEvolveDB, err := store.NewDefaultKVStore(nodeConfig.RootDir, nodeConfig.DBPath, "testapp")
42+
rawEvolveDB, err := store.NewDefaultKVStore(nodeConfig.RootDir, nodeConfig.DBPath, testDbName)
4343
if err != nil {
4444
return err
4545
}

apps/testapp/cmd/run.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import (
1919
"github.com/evstack/ev-node/sequencers/single"
2020
)
2121

22+
const testDbName = "testapp"
23+
2224
var RunCmd = &cobra.Command{
2325
Use: "start",
2426
Aliases: []string{"node", "run"},
@@ -61,7 +63,7 @@ var RunCmd = &cobra.Command{
6163
return err
6264
}
6365

64-
datastore, err := store.NewDefaultKVStore(nodeConfig.RootDir, nodeConfig.DBPath, "testapp")
66+
datastore, err := store.NewDefaultKVStore(nodeConfig.RootDir, nodeConfig.DBPath, testDbName)
6567
if err != nil {
6668
return err
6769
}

0 commit comments

Comments
 (0)