mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-28 20:21:47 +00:00
fix randPort
This commit is contained in:
@ -3,7 +3,6 @@ package rpctest
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
@ -11,6 +10,8 @@ import (
|
|||||||
"github.com/tendermint/tmlibs/log"
|
"github.com/tendermint/tmlibs/log"
|
||||||
|
|
||||||
abci "github.com/tendermint/abci/types"
|
abci "github.com/tendermint/abci/types"
|
||||||
|
cmn "github.com/tendermint/tmlibs/common"
|
||||||
|
|
||||||
cfg "github.com/tendermint/tendermint/config"
|
cfg "github.com/tendermint/tendermint/config"
|
||||||
nm "github.com/tendermint/tendermint/node"
|
nm "github.com/tendermint/tendermint/node"
|
||||||
"github.com/tendermint/tendermint/proxy"
|
"github.com/tendermint/tendermint/proxy"
|
||||||
@ -57,9 +58,7 @@ func makePathname() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func randPort() int {
|
func randPort() int {
|
||||||
// returns between base and base + spread
|
return int(cmn.RandUint16()/2 + 10000)
|
||||||
base, spread := 20000, 20000
|
|
||||||
return base + rand.Intn(spread)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeAddrs() (string, string, string) {
|
func makeAddrs() (string, string, string) {
|
||||||
|
Reference in New Issue
Block a user