mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 13:26:23 +00:00
lint: golint issue fixes (#4258)
* lint: golint issue fixes - on my local machine golint is a lot stricter than the bot so slowly going through and fixing things. Signed-off-by: Marko Baricevic <marbar3778@yahoo.com> * more fixes from golint * remove isPeerPersistentFn * add changelog entry
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
tmos "github.com/tendermint/tendermint/libs/os"
|
||||
"github.com/tendermint/tendermint/libs/rand"
|
||||
tmrand "github.com/tendermint/tendermint/libs/rand"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/privval"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
@@ -56,7 +56,7 @@ func initFilesWithConfig(config *cfg.Config) error {
|
||||
logger.Info("Found genesis file", "path", genFile)
|
||||
} else {
|
||||
genDoc := types.GenesisDoc{
|
||||
ChainID: fmt.Sprintf("test-chain-%v", rand.RandStr(6)),
|
||||
ChainID: fmt.Sprintf("test-chain-%v", tmrand.Str(6)),
|
||||
GenesisTime: tmtime.Now(),
|
||||
ConsensusParams: types.DefaultConsensusParams(),
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
"github.com/tendermint/tendermint/libs/bytes"
|
||||
"github.com/tendermint/tendermint/libs/rand"
|
||||
tmrand "github.com/tendermint/tendermint/libs/rand"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/tendermint/privval"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
@@ -168,7 +168,7 @@ func testnetFiles(cmd *cobra.Command, args []string) error {
|
||||
|
||||
// Generate genesis doc from generated validators
|
||||
genDoc := &types.GenesisDoc{
|
||||
ChainID: "chain-" + rand.RandStr(6),
|
||||
ChainID: "chain-" + tmrand.Str(6),
|
||||
ConsensusParams: types.DefaultConsensusParams(),
|
||||
GenesisTime: tmtime.Now(),
|
||||
Validators: genVals,
|
||||
@@ -262,5 +262,5 @@ func moniker(i int) string {
|
||||
}
|
||||
|
||||
func randomMoniker() string {
|
||||
return bytes.HexBytes(rand.RandBytes(8)).String()
|
||||
return bytes.HexBytes(tmrand.Bytes(8)).String()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user