diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-10-27 19:36:49 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-11-21 21:09:39 +0800 |
commit | ffc12f63ec57682e7c7f6653332856acbeef3183 (patch) | |
tree | 581a82231e18824c36f759421f78caa2cd83a8de /cmd/puppeth/wizard_wallet.go | |
parent | 80be5e546398203c1958a0f512e651a2c36b1fe0 (diff) | |
download | dexon-ffc12f63ec57682e7c7f6653332856acbeef3183.tar dexon-ffc12f63ec57682e7c7f6653332856acbeef3183.tar.gz dexon-ffc12f63ec57682e7c7f6653332856acbeef3183.tar.bz2 dexon-ffc12f63ec57682e7c7f6653332856acbeef3183.tar.lz dexon-ffc12f63ec57682e7c7f6653332856acbeef3183.tar.xz dexon-ffc12f63ec57682e7c7f6653332856acbeef3183.tar.zst dexon-ffc12f63ec57682e7c7f6653332856acbeef3183.zip |
cmd/puppeth: simplifications and pre-built docker images
Diffstat (limited to 'cmd/puppeth/wizard_wallet.go')
-rw-r--r-- | cmd/puppeth/wizard_wallet.go | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/cmd/puppeth/wizard_wallet.go b/cmd/puppeth/wizard_wallet.go index 1165c5cdc..aa6d1c659 100644 --- a/cmd/puppeth/wizard_wallet.go +++ b/cmd/puppeth/wizard_wallet.go @@ -43,9 +43,14 @@ func (w *wizard) deployWallet() { client := w.servers[server] // Retrieve any active node configurations from the server + existed := true + infos, err := checkWallet(client, w.network) if err != nil { - infos = &walletInfos{nodePort: 30303, rpcPort: 8545, webPort: 80, webHost: client.server} + infos = &walletInfos{ + nodePort: 30303, rpcPort: 8545, webPort: 80, webHost: client.server, + } + existed = false } infos.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ") infos.network = w.conf.Genesis.Config.ChainId.Int64() @@ -75,7 +80,7 @@ func (w *wizard) deployWallet() { infos.nodePort = w.readDefaultInt(infos.nodePort) fmt.Println() - fmt.Printf("Which TCP/UDP port should the backing RPC API listen on? (default = %d)\n", infos.rpcPort) + fmt.Printf("Which port should the backing RPC API listen on? (default = %d)\n", infos.rpcPort) infos.rpcPort = w.readDefaultInt(infos.rpcPort) // Set a proper name to report on the stats page @@ -88,10 +93,12 @@ func (w *wizard) deployWallet() { infos.ethstats = w.readDefaultString(infos.ethstats) + ":" + w.conf.ethstats } // Try to deploy the wallet on the host - fmt.Println() - fmt.Printf("Should the wallet be built from scratch (y/n)? (default = no)\n") - nocache := w.readDefaultString("n") != "n" - + nocache := false + if existed { + fmt.Println() + fmt.Printf("Should the wallet be built from scratch (y/n)? (default = no)\n") + nocache = w.readDefaultString("n") != "n" + } if out, err := deployWallet(client, w.network, w.conf.bootFull, infos, nocache); err != nil { log.Error("Failed to deploy wallet container", "err", err) if len(out) > 0 { |