aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/puppeth/wizard_intro.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-12-03 22:50:59 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-12-04 18:12:40 +0800
commitd4415f5e40fbd155adb3e85e4eae5c7db7832694 (patch)
tree8488e9f090452b234a53e3dd346f2874f2bf0b57 /cmd/puppeth/wizard_intro.go
parent8698fbabf6c7811e8eec6e84512510e9c9a4eb45 (diff)
downloaddexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar
dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar.gz
dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar.bz2
dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar.lz
dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar.xz
dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.tar.zst
dexon-d4415f5e40fbd155adb3e85e4eae5c7db7832694.zip
cmd/puppeth: chain import/export via wizard, minor polishes
Diffstat (limited to 'cmd/puppeth/wizard_intro.go')
-rw-r--r--cmd/puppeth/wizard_intro.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/cmd/puppeth/wizard_intro.go b/cmd/puppeth/wizard_intro.go
index 3db9a1087..75fb04b76 100644
--- a/cmd/puppeth/wizard_intro.go
+++ b/cmd/puppeth/wizard_intro.go
@@ -131,7 +131,20 @@ func (w *wizard) run() {
case choice == "2":
if w.conf.Genesis == nil {
- w.makeGenesis()
+ fmt.Println()
+ fmt.Println("What would you like to do? (default = create)")
+ fmt.Println(" 1. Create new genesis from scratch")
+ fmt.Println(" 2. Import already existing genesis")
+
+ choice := w.read()
+ switch {
+ case choice == "" || choice == "1":
+ w.makeGenesis()
+ case choice == "2":
+ w.importGenesis()
+ default:
+ log.Error("That's not something I can do")
+ }
} else {
w.manageGenesis()
}
@@ -149,7 +162,6 @@ func (w *wizard) run() {
} else {
w.manageComponents()
}
-
default:
log.Error("That's not something I can do")
}