Skip to content

Commit d44f1a7

Browse files
committed
cmd/swarm: add default bootnodes for testnet 3
1 parent 4181046 commit d44f1a7

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

cmd/swarm/main.go

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,15 @@ const (
4949
)
5050

5151
var (
52-
gitCommit string // Git SHA1 commit hash of the release (set via linker flags)
53-
app = utils.NewApp(gitCommit, "Ethereum Swarm")
52+
gitCommit string // Git SHA1 commit hash of the release (set via linker flags)
53+
app = utils.NewApp(gitCommit, "Ethereum Swarm")
54+
testbetBootNodes = []string{
55+
"enode://330dce4992f5ec50a4a6f9e16bf35b9d8ee739236b6530e7846fcb058ed24b666e6027513a4b921fd2ec40ff22f6ddec0937bcbc697a8937d9cde83d8fde8a06@13.79.165.39:30403",
56+
"enode://7ea1cc1723b4d51f08f76f6380f5f9faa92232313c6568e79ab1e1a98148f7549a3f8d05b2e6f94c10796e015a224ed2e46df7033077d63a888eeec52fae6fd2@13.79.165.39:30404",
57+
"enode://4363f21af9e94e32b3ad22d88ed04f6e5bcf9407b7cb38a61216c57bbdcb9d5c5beb4f9aac1b78049e8d3a516097f5b92fc116928e35c92e48fc9b68086b78f5@13.79.165.39:30405",
58+
"enode://79b616c70d309b27319461219032ff7f5901c3e522bb5d5b084e4372666f7f006803387e81563bd1bb06937a4adb8efa16c0ea86e921edf49a09e58ac3a90845@13.79.165.39:30406",
59+
"enode://83b4df39d90720193717ccd5476feca81a962a31090fc440a9085941fcbfcd765285edb00c549286be33703d9bfb2723576dc85d705c9bfe1a74ee454d61f2cc@13.79.165.39:30407",
60+
}
5461
)
5562

5663
var (
@@ -103,8 +110,6 @@ var (
103110
}
104111
)
105112

106-
var defaultBootnodes = []string{}
107-
108113
func init() {
109114
// Override flag defaults so bzzd can run alongside geth.
110115
utils.ListenPortFlag.Value = 30399
@@ -211,13 +216,15 @@ func bzzd(ctx *cli.Context) error {
211216
stack := utils.MakeNode(ctx, clientIdentifier, gitCommit)
212217
registerBzzService(ctx, stack)
213218
utils.StartNode(stack)
214-
219+
networkId := ctx.GlobalUint64(SwarmNetworkIdFlag.Name)
215220
// Add bootnodes as initial peers.
216221
if ctx.GlobalIsSet(utils.BootnodesFlag.Name) {
217222
bootnodes := strings.Split(ctx.GlobalString(utils.BootnodesFlag.Name), ",")
218223
injectBootnodes(stack.Server(), bootnodes)
219224
} else {
220-
injectBootnodes(stack.Server(), defaultBootnodes)
225+
if networkId == 3 {
226+
injectBootnodes(stack.Server(), testbetBootNodes)
227+
}
221228
}
222229

223230
stack.Wait()

0 commit comments

Comments
 (0)