|
|
@ -11,9 +11,9 @@ import ( |
|
|
|
"github.com/tendermint/tendermint/libs/log" |
|
|
|
|
|
|
|
abci "github.com/tendermint/tendermint/abci/types" |
|
|
|
cmn "github.com/tendermint/tendermint/libs/common" |
|
|
|
|
|
|
|
cfg "github.com/tendermint/tendermint/config" |
|
|
|
cmn "github.com/tendermint/tendermint/libs/common" |
|
|
|
nm "github.com/tendermint/tendermint/node" |
|
|
|
"github.com/tendermint/tendermint/p2p" |
|
|
|
"github.com/tendermint/tendermint/privval" |
|
|
@ -64,14 +64,17 @@ func makePathname() string { |
|
|
|
} |
|
|
|
|
|
|
|
func randPort() int { |
|
|
|
return int(cmn.RandUint16()/2 + 10000) |
|
|
|
port, err := cmn.GetFreePort() |
|
|
|
if err != nil { |
|
|
|
panic(err) |
|
|
|
} |
|
|
|
return port |
|
|
|
} |
|
|
|
|
|
|
|
func makeAddrs() (string, string, string) { |
|
|
|
start := randPort() |
|
|
|
return fmt.Sprintf("tcp://0.0.0.0:%d", start), |
|
|
|
fmt.Sprintf("tcp://0.0.0.0:%d", start+1), |
|
|
|
fmt.Sprintf("tcp://0.0.0.0:%d", start+2) |
|
|
|
return fmt.Sprintf("tcp://0.0.0.0:%d", randPort()), |
|
|
|
fmt.Sprintf("tcp://0.0.0.0:%d", randPort()), |
|
|
|
fmt.Sprintf("tcp://0.0.0.0:%d", randPort()) |
|
|
|
} |
|
|
|
|
|
|
|
// GetConfig returns a config for the test cases as a singleton
|
|
|
|