aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/main.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-07-16 18:27:42 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-07-16 18:27:42 +0800
commit1909d26fe283dd2ac898ebb5df7204cf952fe6cc (patch)
tree8376575d89dcd86fb389ba579d6582a9606109a1 /cmd/geth/main.go
parent9addb3df3a88ebfa5f54ca4cebb5850f0e4b21f7 (diff)
downloaddexon-1909d26fe283dd2ac898ebb5df7204cf952fe6cc.tar
dexon-1909d26fe283dd2ac898ebb5df7204cf952fe6cc.tar.gz
dexon-1909d26fe283dd2ac898ebb5df7204cf952fe6cc.tar.bz2
dexon-1909d26fe283dd2ac898ebb5df7204cf952fe6cc.tar.lz
dexon-1909d26fe283dd2ac898ebb5df7204cf952fe6cc.tar.xz
dexon-1909d26fe283dd2ac898ebb5df7204cf952fe6cc.tar.zst
dexon-1909d26fe283dd2ac898ebb5df7204cf952fe6cc.zip
Prompt user to accept legalese when datadir doesn't exist
Diffstat (limited to 'cmd/geth/main.go')
-rw-r--r--cmd/geth/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index 6acdff9ad..8099d4dc6 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -346,6 +346,7 @@ func main() {
func run(ctx *cli.Context) {
cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
+ utils.CheckLegalese(cfg.DataDir)
ethereum, err := eth.New(cfg)
if err != nil {
utils.Fatalf("%v", err)
@@ -404,6 +405,7 @@ func console(ctx *cli.Context) {
}
cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
+ utils.CheckLegalese(cfg.DataDir)
ethereum, err := eth.New(cfg)
if err != nil {
utils.Fatalf("%v", err)
@@ -434,6 +436,7 @@ func console(ctx *cli.Context) {
func execJSFiles(ctx *cli.Context) {
cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
+ utils.CheckLegalese(cfg.DataDir)
ethereum, err := eth.New(cfg)
if err != nil {
utils.Fatalf("%v", err)
@@ -487,6 +490,8 @@ func blockRecovery(ctx *cli.Context) {
}
cfg := utils.MakeEthConfig(ClientIdentifier, nodeNameVersion, ctx)
+ utils.CheckLegalese(cfg.DataDir)
+
blockDb, err := ethdb.NewLDBDatabase(filepath.Join(cfg.DataDir, "blockchain"))
if err != nil {
glog.Fatalln("could not open db:", err)