aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/puppeth/wizard_intro.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-10-04 17:15:58 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-10-04 17:15:58 +0800
commitedba5e9854dcef9b4dcb6d75c06d5b5c7e5b8856 (patch)
treef899e9cfb1385d55cc7abfa4eb03512abba1a5ed /cmd/puppeth/wizard_intro.go
parentc0a1f1c9076608cb98f9cbd02a896e966cc2a93b (diff)
downloadgo-tangerine-edba5e9854dcef9b4dcb6d75c06d5b5c7e5b8856.tar
go-tangerine-edba5e9854dcef9b4dcb6d75c06d5b5c7e5b8856.tar.gz
go-tangerine-edba5e9854dcef9b4dcb6d75c06d5b5c7e5b8856.tar.bz2
go-tangerine-edba5e9854dcef9b4dcb6d75c06d5b5c7e5b8856.tar.lz
go-tangerine-edba5e9854dcef9b4dcb6d75c06d5b5c7e5b8856.tar.xz
go-tangerine-edba5e9854dcef9b4dcb6d75c06d5b5c7e5b8856.tar.zst
go-tangerine-edba5e9854dcef9b4dcb6d75c06d5b5c7e5b8856.zip
cmd/puppeth: support managing fork block in the chain config
Diffstat (limited to 'cmd/puppeth/wizard_intro.go')
-rw-r--r--cmd/puppeth/wizard_intro.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/cmd/puppeth/wizard_intro.go b/cmd/puppeth/wizard_intro.go
index c3eaf5324..2d9a097ee 100644
--- a/cmd/puppeth/wizard_intro.go
+++ b/cmd/puppeth/wizard_intro.go
@@ -98,7 +98,7 @@ func (w *wizard) run() {
if w.conf.genesis == nil {
fmt.Println(" 2. Configure new genesis")
} else {
- fmt.Println(" 2. Save existing genesis")
+ fmt.Println(" 2. Manage existing genesis")
}
if len(w.servers) == 0 {
fmt.Println(" 3. Track new remote server")
@@ -118,18 +118,10 @@ func (w *wizard) run() {
w.networkStats(false)
case choice == "2":
- // If we don't have a genesis, make one
if w.conf.genesis == nil {
w.makeGenesis()
} else {
- // Otherwise just save whatever we currently have
- fmt.Println()
- fmt.Printf("Which file to save the genesis into? (default = %s.json)\n", w.network)
- out, _ := json.MarshalIndent(w.conf.genesis, "", " ")
- if err := ioutil.WriteFile(w.readDefaultString(fmt.Sprintf("%s.json", w.network)), out, 0644); err != nil {
- log.Error("Failed to save genesis file", "err", err)
- }
- log.Info("Exported existing genesis block")
+ w.manageGenesis()
}
case choice == "3":
if len(w.servers) == 0 {