From 1db222424192814719030ae03d76e4ddd7884c48 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Wed, 11 Apr 2018 20:53:33 +0200 Subject: [PATCH] do not use mask in testnet cmd (#1451) fix node ids --- cmd/tendermint/commands/testnet.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/tendermint/commands/testnet.go b/cmd/tendermint/commands/testnet.go index 150ebe681..ef503db3f 100644 --- a/cmd/tendermint/commands/testnet.go +++ b/cmd/tendermint/commands/testnet.go @@ -136,8 +136,7 @@ func hostnameOrIP(i int) string { os.Exit(1) } - ip = ip.Mask(ip.DefaultMask()) - for j := 0; j <= i; j++ { + for j := 0; j < i; j++ { ip[3]++ } return ip.String() @@ -149,6 +148,8 @@ func hostnameOrIP(i int) string { func populatePersistentPeersInConfigAndWriteIt(config *cfg.Config) error { persistentPeers := make([]string, nValidators+nNonValidators) for i := 0; i < nValidators+nNonValidators; i++ { + nodeDir := filepath.Join(outputDir, cmn.Fmt("%s%d", nodeDirPrefix, i)) + config.SetRoot(nodeDir) nodeKey, err := p2p.LoadNodeKey(config.NodeKeyFile()) if err != nil { return err