Skip to content

Commit da41a72

Browse files
authored
Merge pull request #16073 from karalabe/puppeth-unify-discovery
cmd/puppeth: unify discv4 and discv5 ports
2 parents 8d32c4b + 12dab53 commit da41a72

File tree

9 files changed

+78
-101
lines changed

9 files changed

+78
-101
lines changed

cmd/puppeth/module_dashboard.go

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ var dashboardContent = `
117117
<br/>
118118
<p>To run an archive node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
119119
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
120-
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=1024 --syncmode=full{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFullFlat}}</pre>
120+
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=1024 --syncmode=full{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
121121
</p>
122122
<br/>
123123
<p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p>
@@ -136,7 +136,7 @@ var dashboardContent = `
136136
<br/>
137137
<p>To run a full node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
138138
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
139-
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=512{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFullFlat}}</pre>
139+
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=512{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
140140
</p>
141141
<br/>
142142
<p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p>
@@ -158,7 +158,7 @@ var dashboardContent = `
158158
<br/>
159159
<p>To run a light node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
160160
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
161-
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesLightFlat}}</pre>
161+
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
162162
</p>
163163
<br/>
164164
<p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p>
@@ -177,7 +177,7 @@ var dashboardContent = `
177177
<br/>
178178
<p>To run an embedded node, download <a href="/{{.GethGenesis}}"><code>{{.GethGenesis}}</code></a> and start Geth with:
179179
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
180-
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=16 --ethash.cachesinmem=1 --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesLightFlat}}</pre>
180+
<pre>geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=16 --ethash.cachesinmem=1 --syncmode=light{{if .Ethstats}} --ethstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFlat}}</pre>
181181
</p>
182182
<br/>
183183
<p>You can download Geth from <a href="https://geth.ethereum.org/downloads/" target="about:blank">https://geth.ethereum.org/downloads/</a>.</p>
@@ -208,7 +208,7 @@ var dashboardContent = `
208208
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
209209
</p>
210210
<p>With your local chain initialized, you can start the Ethereum Wallet:
211-
<pre>ethereumwallet --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFullFlat}}</pre>
211+
<pre>ethereumwallet --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}</pre>
212212
<p>
213213
<br/>
214214
<p>You can download the Ethereum Wallet from <a href="https://github.com/ethereum/mist/releases" target="about:blank">https://github.com/ethereum/mist/releases</a>.</p>
@@ -229,7 +229,7 @@ var dashboardContent = `
229229
<pre>geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}</pre>
230230
</p>
231231
<p>With your local chain initialized, you can start Mist:
232-
<pre>mist --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFullFlat}}</pre>
232+
<pre>mist --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-ethstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFlat}}</pre>
233233
<p>
234234
<br/>
235235
<p>You can download the Mist browser from <a href="https://github.com/ethereum/mist/releases" target="about:blank">https://github.com/ethereum/mist/releases</a>.</p>
@@ -261,7 +261,7 @@ var dashboardContent = `
261261
<p>Inside your Java code you can now import the geth archive and connect to Ethereum:
262262
<pre>import org.ethereum.geth.*;</pre>
263263
<pre>
264-
Enodes bootnodes = new Enodes();{{range .BootnodesLight}}
264+
Enodes bootnodes = new Enodes();{{range .Bootnodes}}
265265
bootnodes.append(new Enode("{{.}}"));{{end}}
266266
267267
NodeConfig config = new NodeConfig();
@@ -294,7 +294,7 @@ node.start();
294294
<pre>
295295
var error: NSError?
296296
297-
let bootnodes = GethNewEnodesEmpty(){{range .BootnodesLight}}
297+
let bootnodes = GethNewEnodesEmpty(){{range .Bootnodes}}
298298
bootnodes?.append(GethNewEnode("{{.}}", &error)){{end}}
299299
300300
let config = GethNewNodeConfig()
@@ -595,44 +595,42 @@ func deployDashboard(client *sshClient, network string, conf *config, config *da
595595
statsLogin = ""
596596
}
597597
indexfile := new(bytes.Buffer)
598-
bootCpp := make([]string, len(conf.bootFull))
599-
for i, boot := range conf.bootFull {
598+
bootCpp := make([]string, len(conf.bootnodes))
599+
for i, boot := range conf.bootnodes {
600600
bootCpp[i] = "required:" + strings.TrimPrefix(boot, "enode://")
601601
}
602-
bootHarmony := make([]string, len(conf.bootFull))
603-
for i, boot := range conf.bootFull {
602+
bootHarmony := make([]string, len(conf.bootnodes))
603+
for i, boot := range conf.bootnodes {
604604
bootHarmony[i] = fmt.Sprintf("-Dpeer.active.%d.url=%s", i, boot)
605605
}
606-
bootPython := make([]string, len(conf.bootFull))
607-
for i, boot := range conf.bootFull {
606+
bootPython := make([]string, len(conf.bootnodes))
607+
for i, boot := range conf.bootnodes {
608608
bootPython[i] = "'" + boot + "'"
609609
}
610610
template.Must(template.New("").Parse(dashboardContent)).Execute(indexfile, map[string]interface{}{
611-
"Network": network,
612-
"NetworkID": conf.Genesis.Config.ChainId,
613-
"NetworkTitle": strings.Title(network),
614-
"EthstatsPage": config.ethstats,
615-
"ExplorerPage": config.explorer,
616-
"WalletPage": config.wallet,
617-
"FaucetPage": config.faucet,
618-
"GethGenesis": network + ".json",
619-
"BootnodesFull": conf.bootFull,
620-
"BootnodesLight": conf.bootLight,
621-
"BootnodesFullFlat": strings.Join(conf.bootFull, ","),
622-
"BootnodesLightFlat": strings.Join(conf.bootLight, ","),
623-
"Ethstats": statsLogin,
624-
"Ethash": conf.Genesis.Config.Ethash != nil,
625-
"CppGenesis": network + "-cpp.json",
626-
"CppBootnodes": strings.Join(bootCpp, " "),
627-
"HarmonyGenesis": network + "-harmony.json",
628-
"HarmonyBootnodes": strings.Join(bootHarmony, " "),
629-
"ParityGenesis": network + "-parity.json",
630-
"PythonGenesis": network + "-python.json",
631-
"PythonBootnodes": strings.Join(bootPython, ","),
632-
"Homestead": conf.Genesis.Config.HomesteadBlock,
633-
"Tangerine": conf.Genesis.Config.EIP150Block,
634-
"Spurious": conf.Genesis.Config.EIP155Block,
635-
"Byzantium": conf.Genesis.Config.ByzantiumBlock,
611+
"Network": network,
612+
"NetworkID": conf.Genesis.Config.ChainId,
613+
"NetworkTitle": strings.Title(network),
614+
"EthstatsPage": config.ethstats,
615+
"ExplorerPage": config.explorer,
616+
"WalletPage": config.wallet,
617+
"FaucetPage": config.faucet,
618+
"GethGenesis": network + ".json",
619+
"Bootnodes": conf.bootnodes,
620+
"BootnodesFlat": strings.Join(conf.bootnodes, ","),
621+
"Ethstats": statsLogin,
622+
"Ethash": conf.Genesis.Config.Ethash != nil,
623+
"CppGenesis": network + "-cpp.json",
624+
"CppBootnodes": strings.Join(bootCpp, " "),
625+
"HarmonyGenesis": network + "-harmony.json",
626+
"HarmonyBootnodes": strings.Join(bootHarmony, " "),
627+
"ParityGenesis": network + "-parity.json",
628+
"PythonGenesis": network + "-python.json",
629+
"PythonBootnodes": strings.Join(bootPython, ","),
630+
"Homestead": conf.Genesis.Config.HomesteadBlock,
631+
"Tangerine": conf.Genesis.Config.EIP150Block,
632+
"Spurious": conf.Genesis.Config.EIP155Block,
633+
"Byzantium": conf.Genesis.Config.ByzantiumBlock,
636634
})
637635
files[filepath.Join(workdir, "index.html")] = indexfile.Bytes()
638636

@@ -651,7 +649,7 @@ func deployDashboard(client *sshClient, network string, conf *config, config *da
651649
harmonySpecJSON, _ := conf.Genesis.MarshalJSON()
652650
files[filepath.Join(workdir, network+"-harmony.json")] = harmonySpecJSON
653651

654-
paritySpec, err := newParityChainSpec(network, conf.Genesis, conf.bootFull)
652+
paritySpec, err := newParityChainSpec(network, conf.Genesis, conf.bootnodes)
655653
if err != nil {
656654
return nil, err
657655
}

cmd/puppeth/module_faucet.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func deployFaucet(client *sshClient, network string, bootnodes []string, config
9393
"NetworkID": config.node.network,
9494
"Bootnodes": strings.Join(bootnodes, ","),
9595
"Ethstats": config.node.ethstats,
96-
"EthPort": config.node.portFull,
96+
"EthPort": config.node.port,
9797
"CaptchaToken": config.captchaToken,
9898
"CaptchaSecret": config.captchaSecret,
9999
"FaucetName": strings.Title(network),
@@ -110,7 +110,7 @@ func deployFaucet(client *sshClient, network string, bootnodes []string, config
110110
"Datadir": config.node.datadir,
111111
"VHost": config.host,
112112
"ApiPort": config.port,
113-
"EthPort": config.node.portFull,
113+
"EthPort": config.node.port,
114114
"EthName": config.node.ethstats[:strings.Index(config.node.ethstats, ":")],
115115
"CaptchaToken": config.captchaToken,
116116
"CaptchaSecret": config.captchaSecret,
@@ -158,7 +158,7 @@ func (info *faucetInfos) Report() map[string]string {
158158
report := map[string]string{
159159
"Website address": info.host,
160160
"Website listener port": strconv.Itoa(info.port),
161-
"Ethereum listener port": strconv.Itoa(info.node.portFull),
161+
"Ethereum listener port": strconv.Itoa(info.node.port),
162162
"Funding amount (base tier)": fmt.Sprintf("%d Ethers", info.amount),
163163
"Funding cooldown (base tier)": fmt.Sprintf("%d mins", info.minutes),
164164
"Funding tiers": strconv.Itoa(info.tiers),
@@ -228,7 +228,7 @@ func checkFaucet(client *sshClient, network string) (*faucetInfos, error) {
228228
return &faucetInfos{
229229
node: &nodeInfos{
230230
datadir: infos.volumes["/root/.faucet"],
231-
portFull: infos.portmap[infos.envvars["ETH_PORT"]+"/tcp"],
231+
port: infos.portmap[infos.envvars["ETH_PORT"]+"/tcp"],
232232
ethstats: infos.envvars["ETH_NAME"],
233233
keyJSON: keyJSON,
234234
keyPass: keyPass,

cmd/puppeth/module_node.go

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ADD genesis.json /genesis.json
4242
RUN \
4343
echo 'geth --cache 512 init /genesis.json' > geth.sh && \{{if .Unlock}}
4444
echo 'mkdir -p /root/.ethereum/keystore/ && cp /signer.json /root/.ethereum/keystore/' >> geth.sh && \{{end}}
45-
echo $'geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .BootV4}}--bootnodesv4 {{.BootV4}}{{end}} {{if .BootV5}}--bootnodesv5 {{.BootV5}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine --minerthreads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> geth.sh
45+
echo $'geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --ethstats \'{{.Ethstats}}\' {{if .Bootnodes}}--bootnodes {{.Bootnodes}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine --minerthreads 1{{end}} {{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> geth.sh
4646
4747
ENTRYPOINT ["/bin/sh", "geth.sh"]
4848
`
@@ -56,15 +56,13 @@ services:
5656
build: .
5757
image: {{.Network}}/{{.Type}}
5858
ports:
59-
- "{{.FullPort}}:{{.FullPort}}"
60-
- "{{.FullPort}}:{{.FullPort}}/udp"{{if .Light}}
61-
- "{{.LightPort}}:{{.LightPort}}/udp"{{end}}
59+
- "{{.Port}}:{{.Port}}"
60+
- "{{.Port}}:{{.Port}}/udp"
6261
volumes:
6362
- {{.Datadir}}:/root/.ethereum{{if .Ethashdir}}
6463
- {{.Ethashdir}}:/root/.ethash{{end}}
6564
environment:
66-
- FULL_PORT={{.FullPort}}/tcp
67-
- LIGHT_PORT={{.LightPort}}/udp
65+
- PORT={{.Port}}/tcp
6866
- TOTAL_PEERS={{.TotalPeers}}
6967
- LIGHT_PEERS={{.LightPeers}}
7068
- STATS_NAME={{.Ethstats}}
@@ -82,12 +80,11 @@ services:
8280
// deployNode deploys a new Ethereum node container to a remote machine via SSH,
8381
// docker and docker-compose. If an instance with the specified network name
8482
// already exists there, it will be overwritten!
85-
func deployNode(client *sshClient, network string, bootv4, bootv5 []string, config *nodeInfos, nocache bool) ([]byte, error) {
83+
func deployNode(client *sshClient, network string, bootnodes []string, config *nodeInfos, nocache bool) ([]byte, error) {
8684
kind := "sealnode"
8785
if config.keyJSON == "" && config.etherbase == "" {
8886
kind = "bootnode"
89-
bootv4 = make([]string, 0)
90-
bootv5 = make([]string, 0)
87+
bootnodes = make([]string, 0)
9188
}
9289
// Generate the content to upload to the server
9390
workdir := fmt.Sprintf("%d", rand.Int63())
@@ -100,11 +97,10 @@ func deployNode(client *sshClient, network string, bootv4, bootv5 []string, conf
10097
dockerfile := new(bytes.Buffer)
10198
template.Must(template.New("").Parse(nodeDockerfile)).Execute(dockerfile, map[string]interface{}{
10299
"NetworkID": config.network,
103-
"Port": config.portFull,
100+
"Port": config.port,
104101
"Peers": config.peersTotal,
105102
"LightFlag": lightFlag,
106-
"BootV4": strings.Join(bootv4, ","),
107-
"BootV5": strings.Join(bootv5, ","),
103+
"Bootnodes": strings.Join(bootnodes, ","),
108104
"Ethstats": config.ethstats,
109105
"Etherbase": config.etherbase,
110106
"GasTarget": uint64(1000000 * config.gasTarget),
@@ -119,10 +115,9 @@ func deployNode(client *sshClient, network string, bootv4, bootv5 []string, conf
119115
"Datadir": config.datadir,
120116
"Ethashdir": config.ethashdir,
121117
"Network": network,
122-
"FullPort": config.portFull,
118+
"Port": config.port,
123119
"TotalPeers": config.peersTotal,
124120
"Light": config.peersLight > 0,
125-
"LightPort": config.portFull + 1,
126121
"LightPeers": config.peersLight,
127122
"Ethstats": config.ethstats[:strings.Index(config.ethstats, ":")],
128123
"Etherbase": config.etherbase,
@@ -157,10 +152,8 @@ type nodeInfos struct {
157152
datadir string
158153
ethashdir string
159154
ethstats string
160-
portFull int
161-
portLight int
162-
enodeFull string
163-
enodeLight string
155+
port int
156+
enode string
164157
peersTotal int
165158
peersLight int
166159
etherbase string
@@ -174,15 +167,11 @@ type nodeInfos struct {
174167
// most - but not all - fields for reporting to the user.
175168
func (info *nodeInfos) Report() map[string]string {
176169
report := map[string]string{
177-
"Data directory": info.datadir,
178-
"Listener port (full nodes)": strconv.Itoa(info.portFull),
179-
"Peer count (all total)": strconv.Itoa(info.peersTotal),
180-
"Peer count (light nodes)": strconv.Itoa(info.peersLight),
181-
"Ethstats username": info.ethstats,
182-
}
183-
if info.peersLight > 0 {
184-
// Light server enabled
185-
report["Listener port (light nodes)"] = strconv.Itoa(info.portLight)
170+
"Data directory": info.datadir,
171+
"Listener port": strconv.Itoa(info.port),
172+
"Peer count (all total)": strconv.Itoa(info.peersTotal),
173+
"Peer count (light nodes)": strconv.Itoa(info.peersLight),
174+
"Ethstats username": info.ethstats,
186175
}
187176
if info.gasTarget > 0 {
188177
// Miner or signer node
@@ -250,7 +239,7 @@ func checkNode(client *sshClient, network string, boot bool) (*nodeInfos, error)
250239
keyPass = string(bytes.TrimSpace(out))
251240
}
252241
// Run a sanity check to see if the devp2p is reachable
253-
port := infos.portmap[infos.envvars["FULL_PORT"]]
242+
port := infos.portmap[infos.envvars["PORT"]]
254243
if err = checkPort(client.server, port); err != nil {
255244
log.Warn(fmt.Sprintf("%s devp2p port seems unreachable", strings.Title(kind)), "server", client.server, "port", port, "err", err)
256245
}
@@ -259,8 +248,7 @@ func checkNode(client *sshClient, network string, boot bool) (*nodeInfos, error)
259248
genesis: genesis,
260249
datadir: infos.volumes["/root/.ethereum"],
261250
ethashdir: infos.volumes["/root/.ethash"],
262-
portFull: infos.portmap[infos.envvars["FULL_PORT"]],
263-
portLight: infos.portmap[infos.envvars["LIGHT_PORT"]],
251+
port: port,
264252
peersTotal: totalPeers,
265253
peersLight: lightPeers,
266254
ethstats: infos.envvars["STATS_NAME"],
@@ -270,9 +258,7 @@ func checkNode(client *sshClient, network string, boot bool) (*nodeInfos, error)
270258
gasTarget: gasTarget,
271259
gasPrice: gasPrice,
272260
}
273-
stats.enodeFull = fmt.Sprintf("enode://%s@%s:%d", id, client.address, stats.portFull)
274-
if stats.portLight != 0 {
275-
stats.enodeLight = fmt.Sprintf("enode://%s@%s:%d?discport=%d", id, client.address, stats.portFull, stats.portLight)
276-
}
261+
stats.enode = fmt.Sprintf("enode://%s@%s:%d", id, client.address, stats.port)
262+
277263
return stats, nil
278264
}

cmd/puppeth/wizard.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ import (
4040
// between sessions.
4141
type config struct {
4242
path string // File containing the configuration values
43-
bootFull []string // Bootnodes to always connect to by full nodes
44-
bootLight []string // Bootnodes to always connect to by light nodes
43+
bootnodes []string // Bootnodes to always connect to by all nodes
4544
ethstats string // Ethstats settings to cache for node deploys
4645

4746
Genesis *core.Genesis `json:"genesis,omitempty"` // Genesis block to cache for node deploys

cmd/puppeth/wizard_explorer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (w *wizard) deployExplorer() {
5555
}
5656
existed := err == nil
5757

58-
chainspec, err := newParityChainSpec(w.network, w.conf.Genesis, w.conf.bootFull)
58+
chainspec, err := newParityChainSpec(w.network, w.conf.Genesis, w.conf.bootnodes)
5959
if err != nil {
6060
log.Error("Failed to create chain spec for explorer", "err", err)
6161
return

cmd/puppeth/wizard_faucet.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (w *wizard) deployFaucet() {
3838
infos, err := checkFaucet(client, w.network)
3939
if err != nil {
4040
infos = &faucetInfos{
41-
node: &nodeInfos{portFull: 30303, peersTotal: 25},
41+
node: &nodeInfos{port: 30303, peersTotal: 25},
4242
port: 80,
4343
host: client.server,
4444
amount: 1,
@@ -113,8 +113,8 @@ func (w *wizard) deployFaucet() {
113113
}
114114
// Figure out which port to listen on
115115
fmt.Println()
116-
fmt.Printf("Which TCP/UDP port should the light client listen on? (default = %d)\n", infos.node.portFull)
117-
infos.node.portFull = w.readDefaultInt(infos.node.portFull)
116+
fmt.Printf("Which TCP/UDP port should the light client listen on? (default = %d)\n", infos.node.port)
117+
infos.node.port = w.readDefaultInt(infos.node.port)
118118

119119
// Set a proper name to report on the stats page
120120
fmt.Println()
@@ -168,7 +168,7 @@ func (w *wizard) deployFaucet() {
168168
fmt.Printf("Should the faucet be built from scratch (y/n)? (default = no)\n")
169169
nocache = w.readDefaultString("n") != "n"
170170
}
171-
if out, err := deployFaucet(client, w.network, w.conf.bootLight, infos, nocache); err != nil {
171+
if out, err := deployFaucet(client, w.network, w.conf.bootnodes, infos, nocache); err != nil {
172172
log.Error("Failed to deploy faucet container", "err", err)
173173
if len(out) > 0 {
174174
fmt.Printf("%s\n", out)

0 commit comments

Comments
 (0)