Skip to content

Commit 3c99315

Browse files
author
Lars Gierth
committed
1 parent 30e06eb commit 3c99315

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

util/util.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ func starBootstrap(nodes []IpfsNode, icfg *InitCfg) error {
405405

406406
bcfg.Bootstrap = nil
407407
bcfg.Addresses.Swarm = []string{icfg.swarmAddrForPeer(0)}
408-
bcfg.Addresses.API = icfg.apiAddrForPeer(0)
409-
bcfg.Addresses.Gateway = ""
408+
bcfg.Addresses.API = []string{icfg.apiAddrForPeer(0)}
409+
bcfg.Addresses.Gateway = []string{}
410410
bcfg.Discovery.MDNS.Enabled = icfg.Mdns
411411

412412
err = king.WriteConfig(bcfg)
@@ -423,12 +423,12 @@ func starBootstrap(nodes []IpfsNode, icfg *InitCfg) error {
423423
ba := fmt.Sprintf("%s/ipfs/%s", bcfg.Addresses.Swarm[0], bcfg.Identity.PeerID)
424424
ba = strings.Replace(ba, "0.0.0.0", "127.0.0.1", -1)
425425
cfg.Bootstrap = []string{ba}
426-
cfg.Addresses.Gateway = ""
426+
cfg.Addresses.Gateway = []string{}
427427
cfg.Discovery.MDNS.Enabled = icfg.Mdns
428428
cfg.Addresses.Swarm = []string{
429429
icfg.swarmAddrForPeer(i + 1),
430430
}
431-
cfg.Addresses.API = icfg.apiAddrForPeer(i + 1)
431+
cfg.Addresses.API = []string{icfg.apiAddrForPeer(i + 1)}
432432

433433
err = nd.WriteConfig(cfg)
434434
if err != nil {
@@ -446,9 +446,9 @@ func clearBootstrapping(nodes []IpfsNode, icfg *InitCfg) error {
446446
}
447447

448448
cfg.Bootstrap = nil
449-
cfg.Addresses.Gateway = ""
449+
cfg.Addresses.Gateway = []string{}
450450
cfg.Addresses.Swarm = []string{icfg.swarmAddrForPeer(i)}
451-
cfg.Addresses.API = icfg.apiAddrForPeer(i)
451+
cfg.Addresses.API = []string{icfg.apiAddrForPeer(i)}
452452
cfg.Discovery.MDNS.Enabled = icfg.Mdns
453453
err = nd.WriteConfig(cfg)
454454
if err != nil {

0 commit comments

Comments
 (0)