aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/puppeth/wizard_node.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-10-27 19:36:49 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-11-21 21:09:39 +0800
commitffc12f63ec57682e7c7f6653332856acbeef3183 (patch)
tree581a82231e18824c36f759421f78caa2cd83a8de /cmd/puppeth/wizard_node.go
parent80be5e546398203c1958a0f512e651a2c36b1fe0 (diff)
downloadgo-tangerine-ffc12f63ec57682e7c7f6653332856acbeef3183.tar
go-tangerine-ffc12f63ec57682e7c7f6653332856acbeef3183.tar.gz
go-tangerine-ffc12f63ec57682e7c7f6653332856acbeef3183.tar.bz2
go-tangerine-ffc12f63ec57682e7c7f6653332856acbeef3183.tar.lz
go-tangerine-ffc12f63ec57682e7c7f6653332856acbeef3183.tar.xz
go-tangerine-ffc12f63ec57682e7c7f6653332856acbeef3183.tar.zst
go-tangerine-ffc12f63ec57682e7c7f6653332856acbeef3183.zip
cmd/puppeth: simplifications and pre-built docker images
Diffstat (limited to 'cmd/puppeth/wizard_node.go')
-rw-r--r--cmd/puppeth/wizard_node.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go
index a70178db2..8de1a1b0b 100644
--- a/cmd/puppeth/wizard_node.go
+++ b/cmd/puppeth/wizard_node.go
@@ -45,6 +45,8 @@ func (w *wizard) deployNode(boot bool) {
client := w.servers[server]
// Retrieve any active node configurations from the server
+ existed := true
+
infos, err := checkNode(client, w.network, boot)
if err != nil {
if boot {
@@ -52,6 +54,7 @@ func (w *wizard) deployNode(boot bool) {
} else {
infos = &nodeInfos{portFull: 30303, peersTotal: 50, peersLight: 0, gasTarget: 4.7, gasPrice: 18}
}
+ existed = false
}
infos.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ")
infos.network = w.conf.Genesis.Config.ChainId.Int64()
@@ -155,10 +158,12 @@ func (w *wizard) deployNode(boot bool) {
infos.gasPrice = w.readDefaultFloat(infos.gasPrice)
}
// Try to deploy the full node on the host
- fmt.Println()
- fmt.Printf("Should the node be built from scratch (y/n)? (default = no)\n")
- nocache := w.readDefaultString("n") != "n"
-
+ nocache := false
+ if existed {
+ fmt.Println()
+ fmt.Printf("Should the node be built from scratch (y/n)? (default = no)\n")
+ nocache = w.readDefaultString("n") != "n"
+ }
if out, err := deployNode(client, w.network, w.conf.bootFull, w.conf.bootLight, infos, nocache); err != nil {
log.Error("Failed to deploy Ethereum node container", "err", err)
if len(out) > 0 {