diff --git a/cmd/puppeth/module_dashboard.go b/cmd/puppeth/module_dashboard.go index 4fdb03e78423445446b7b44ddd7856894adf6e12..b6d964696f4f4cbc024d566f9369ea975d40a5ee 100644 --- a/cmd/puppeth/module_dashboard.go +++ b/cmd/puppeth/module_dashboard.go @@ -696,7 +696,7 @@ type dashboardInfos struct { faucet string } -// Report converts the typed struct into a plain string->string map, cotnaining +// Report converts the typed struct into a plain string->string map, containing // most - but not all - fields for reporting to the user. func (info *dashboardInfos) Report() map[string]string { return map[string]string{ diff --git a/cmd/puppeth/module_ethstats.go b/cmd/puppeth/module_ethstats.go index cf9e66bc14ee9349b71217934cccf1d6b07feea3..20b7afe236bd86044dd029f3275bb0ed035c1164 100644 --- a/cmd/puppeth/module_ethstats.go +++ b/cmd/puppeth/module_ethstats.go @@ -115,7 +115,7 @@ type ethstatsInfos struct { banned []string } -// Report converts the typed struct into a plain string->string map, cotnaining +// Report converts the typed struct into a plain string->string map, containing // most - but not all - fields for reporting to the user. func (info *ethstatsInfos) Report() map[string]string { return map[string]string{ diff --git a/cmd/puppeth/module_explorer.go b/cmd/puppeth/module_explorer.go index 99a9e9df87b345b7a0250c4beb0ad46a3787a0c9..427134153b8c897c4f95b3b42ea21cc368350784 100644 --- a/cmd/puppeth/module_explorer.go +++ b/cmd/puppeth/module_explorer.go @@ -155,7 +155,7 @@ type explorerInfos struct { webPort int } -// Report converts the typed struct into a plain string->string map, cotnaining +// Report converts the typed struct into a plain string->string map, containing // most - but not all - fields for reporting to the user. func (info *explorerInfos) Report() map[string]string { report := map[string]string{ diff --git a/cmd/puppeth/module_faucet.go b/cmd/puppeth/module_faucet.go index 615aea34a08fbc60d78db622778adf6e8ef46a96..57b7a2dc078209ead78f7c4fbb1ccab88e41b41f 100644 --- a/cmd/puppeth/module_faucet.go +++ b/cmd/puppeth/module_faucet.go @@ -150,7 +150,7 @@ type faucetInfos struct { captchaSecret string } -// Report converts the typed struct into a plain string->string map, cotnaining +// Report converts the typed struct into a plain string->string map, containing // most - but not all - fields for reporting to the user. func (info *faucetInfos) Report() map[string]string { report := map[string]string{ diff --git a/cmd/puppeth/module_nginx.go b/cmd/puppeth/module_nginx.go index ade0e4963c0b3c774df2c4127d78d2b076c77195..35c0efc8ad8104354ddbdcf59a2cee6fb80e720e 100644 --- a/cmd/puppeth/module_nginx.go +++ b/cmd/puppeth/module_nginx.go @@ -92,7 +92,7 @@ type nginxInfos struct { port int } -// Report converts the typed struct into a plain string->string map, cotnaining +// Report converts the typed struct into a plain string->string map, containing // most - but not all - fields for reporting to the user. func (info *nginxInfos) Report() map[string]string { return map[string]string{ diff --git a/cmd/puppeth/module_node.go b/cmd/puppeth/module_node.go index 9b8d5f0f7729738d178710684c106976f68b4d96..69cb19c3496adb749b89a5ece21198dbf2ea2955 100644 --- a/cmd/puppeth/module_node.go +++ b/cmd/puppeth/module_node.go @@ -170,7 +170,7 @@ type nodeInfos struct { gasPrice float64 } -// Report converts the typed struct into a plain string->string map, cotnaining +// Report converts the typed struct into a plain string->string map, containing // most - but not all - fields for reporting to the user. func (info *nodeInfos) Report() map[string]string { report := map[string]string{ diff --git a/cmd/puppeth/module_wallet.go b/cmd/puppeth/module_wallet.go index 5ab8d2de1e2582cadc4cb075d4e88f5efa7f4873..67f47c70e840f254f9fd055bc89e3ded71afd218 100644 --- a/cmd/puppeth/module_wallet.go +++ b/cmd/puppeth/module_wallet.go @@ -138,7 +138,7 @@ type walletInfos struct { webPort int } -// Report converts the typed struct into a plain string->string map, cotnaining +// Report converts the typed struct into a plain string->string map, containing // most - but not all - fields for reporting to the user. func (info *walletInfos) Report() map[string]string { report := map[string]string{ diff --git a/cmd/puppeth/wizard_dashboard.go b/cmd/puppeth/wizard_dashboard.go index 278b5533ab3305ffeb61492b29cb387cf5789522..5f781c4152a97b292a00210ec79570c4b3f50867 100644 --- a/cmd/puppeth/wizard_dashboard.go +++ b/cmd/puppeth/wizard_dashboard.go @@ -33,16 +33,15 @@ func (w *wizard) deployDashboard() { client := w.servers[server] // Retrieve any active dashboard configurations from the server - existed := true - infos, err := checkDashboard(client, w.network) if err != nil { infos = &dashboardInfos{ port: 80, host: client.server, } - existed = false } + existed := err == nil + // Figure out which port to listen on fmt.Println() fmt.Printf("Which port should the dashboard listen on? (default = %d)\n", infos.port) diff --git a/cmd/puppeth/wizard_ethstats.go b/cmd/puppeth/wizard_ethstats.go index 56dbeb9b484cf5e9e0e2624b3a6c39b05e34c438..fb2529c2673a4975edac42b4fd6311c9f7633cab 100644 --- a/cmd/puppeth/wizard_ethstats.go +++ b/cmd/puppeth/wizard_ethstats.go @@ -34,8 +34,6 @@ func (w *wizard) deployEthstats() { client := w.servers[server] // Retrieve any active ethstats configurations from the server - existed := true - infos, err := checkEthstats(client, w.network) if err != nil { infos = ðstatsInfos{ @@ -43,8 +41,9 @@ func (w *wizard) deployEthstats() { host: client.server, secret: "", } - existed = false } + existed := err == nil + // Figure out which port to listen on fmt.Println() fmt.Printf("Which port should ethstats listen on? (default = %d)\n", infos.port) diff --git a/cmd/puppeth/wizard_explorer.go b/cmd/puppeth/wizard_explorer.go index ed586bc76eca938e7fd602dfa49bf9da3e1af225..10ef72f78863f28fa648f2cae826d2debece20ea 100644 --- a/cmd/puppeth/wizard_explorer.go +++ b/cmd/puppeth/wizard_explorer.go @@ -47,15 +47,14 @@ func (w *wizard) deployExplorer() { client := w.servers[server] // Retrieve any active node configurations from the server - existed := true - infos, err := checkExplorer(client, w.network) if err != nil { infos = &explorerInfos{ nodePort: 30303, webPort: 80, webHost: client.server, } - existed = false } + existed := err == nil + chainspec, err := newParityChainSpec(w.network, w.conf.Genesis, w.conf.bootFull) if err != nil { log.Error("Failed to create chain spec for explorer", "err", err) diff --git a/cmd/puppeth/wizard_faucet.go b/cmd/puppeth/wizard_faucet.go index 7ecb376de638d091ce38a4bcf67c0f701af2db7c..191575b1685ef2a4e9cd75e73d5d9efc211f4151 100644 --- a/cmd/puppeth/wizard_faucet.go +++ b/cmd/puppeth/wizard_faucet.go @@ -35,8 +35,6 @@ func (w *wizard) deployFaucet() { client := w.servers[server] // Retrieve any active faucet configurations from the server - existed := true - infos, err := checkFaucet(client, w.network) if err != nil { infos = &faucetInfos{ @@ -47,8 +45,9 @@ func (w *wizard) deployFaucet() { minutes: 1440, tiers: 3, } - existed = false } + existed := err == nil + infos.node.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ") infos.node.network = w.conf.Genesis.Config.ChainId.Int64() diff --git a/cmd/puppeth/wizard_node.go b/cmd/puppeth/wizard_node.go index 8de1a1b0b4cd23641963a719beaef9e31a9b0a7b..097e2e41aa90401127c0f4bee16fc4af2f0a4efd 100644 --- a/cmd/puppeth/wizard_node.go +++ b/cmd/puppeth/wizard_node.go @@ -45,8 +45,6 @@ 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 { @@ -54,8 +52,9 @@ func (w *wizard) deployNode(boot bool) { } else { infos = &nodeInfos{portFull: 30303, peersTotal: 50, peersLight: 0, gasTarget: 4.7, gasPrice: 18} } - existed = false } + existed := err == nil + infos.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ") infos.network = w.conf.Genesis.Config.ChainId.Int64() diff --git a/cmd/puppeth/wizard_wallet.go b/cmd/puppeth/wizard_wallet.go index aa6d1c6597bc7455a713d0799542b0cfad5e589b..7c3896a17c90a2ed311be8188c2d57756e5ea4ca 100644 --- a/cmd/puppeth/wizard_wallet.go +++ b/cmd/puppeth/wizard_wallet.go @@ -43,15 +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, } - existed = false } + existed := err == nil + infos.genesis, _ = json.MarshalIndent(w.conf.Genesis, "", " ") infos.network = w.conf.Genesis.Config.ChainId.Int64()