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:
Marko
2019-12-17 13:02:45 +01:00
committed by GitHub
parent f0777277ad
commit 9bd0f9e634
56 changed files with 246 additions and 246 deletions

View File

@@ -17,7 +17,7 @@ import (
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/evidence"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/libs/rand"
tmrand "github.com/tendermint/tendermint/libs/rand"
mempl "github.com/tendermint/tendermint/mempool"
"github.com/tendermint/tendermint/p2p"
p2pmock "github.com/tendermint/tendermint/p2p/mock"
@@ -174,7 +174,7 @@ func TestPrivValidatorListenAddrNoProtocol(t *testing.T) {
}
func TestNodeSetPrivValIPC(t *testing.T) {
tmpfile := "/tmp/kms." + rand.RandStr(6) + ".sock"
tmpfile := "/tmp/kms." + tmrand.Str(6) + ".sock"
defer os.Remove(tmpfile) // clean up
config := cfg.ResetTestRoot("node_priv_val_tcp_test")
@@ -257,7 +257,7 @@ func TestCreateProposalBlock(t *testing.T) {
minEvSize := 12
numEv := (maxBytes / types.MaxEvidenceBytesDenominator) / minEvSize
for i := 0; i < numEv; i++ {
ev := types.NewMockRandomGoodEvidence(1, proposerAddr, rand.RandBytes(minEvSize))
ev := types.NewMockRandomGoodEvidence(1, proposerAddr, tmrand.Bytes(minEvSize))
err := evidencePool.AddEvidence(ev)
assert.NoError(t, err)
}
@@ -266,7 +266,7 @@ func TestCreateProposalBlock(t *testing.T) {
// than can fit in a block
txLength := 1000
for i := 0; i < maxBytes/txLength; i++ {
tx := rand.RandBytes(txLength)
tx := tmrand.Bytes(txLength)
err := mempool.CheckTx(tx, nil, mempl.TxInfo{})
assert.NoError(t, err)
}