From 0d9004a8545e37a8aa5a1f2bde8acda48746b40b Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Thu, 26 Apr 2018 16:52:11 +0200 Subject: [PATCH] [cmd] Turn off strict routability when using testnet cmd (#1493) * [cmd] Turn off strict routability when using testnet cmd Refs https://github.com/tendermint/tendermint/pull/1454 * use "testnet" instead of "it" --- cmd/tendermint/commands/testnet.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cmd/tendermint/commands/testnet.go b/cmd/tendermint/commands/testnet.go index ef503db3f..3b29e20a2 100644 --- a/cmd/tendermint/commands/testnet.go +++ b/cmd/tendermint/commands/testnet.go @@ -57,7 +57,18 @@ func init() { var TestnetFilesCmd = &cobra.Command{ Use: "testnet", Short: "Initialize files for a Tendermint testnet", - RunE: testnetFiles, + Long: `testnet will create "v" + "n" number of directories and populate each with +necessary files (private validator, genesis, config, etc.). + +Note, strict routability for addresses is turned off in the config file. + +Optionally, it will fill in persistent_peers list in config file using either hostnames or IPs. + +Example: + + tendermint testnet --v 4 --o ./output --populate-persistent-peers --starting-ip-address 192.168.10.2 + `, + RunE: testnetFiles, } func testnetFiles(cmd *cobra.Command, args []string) error { @@ -162,6 +173,7 @@ func populatePersistentPeersInConfigAndWriteIt(config *cfg.Config) error { nodeDir := filepath.Join(outputDir, cmn.Fmt("%s%d", nodeDirPrefix, i)) config.SetRoot(nodeDir) config.P2P.PersistentPeers = persistentPeersList + config.P2P.AddrBookStrict = false // overwrite default config cfg.WriteConfigFile(filepath.Join(nodeDir, "config", "config.toml"), config)