mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-16 04:06:12 +00:00
fix linter issues
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"github.com/rs/cors"
|
||||
|
||||
"github.com/tendermint/go-amino"
|
||||
amino "github.com/tendermint/go-amino"
|
||||
abci "github.com/tendermint/tendermint/abci/types"
|
||||
bc "github.com/tendermint/tendermint/blockchain"
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
|
||||
@@ -50,7 +50,7 @@ func TestResetValidator(t *testing.T) {
|
||||
// test vote
|
||||
height, round := int64(10), 1
|
||||
voteType := byte(types.PrevoteType)
|
||||
blockID := types.BlockID{[]byte{1, 2, 3}, types.PartSetHeader{}}
|
||||
blockID := types.BlockID{Hash: []byte{1, 2, 3}}
|
||||
vote := newVote(privVal.Key.Address, 0, height, round, voteType, blockID)
|
||||
err = privVal.SignVote("mychainid", vote)
|
||||
assert.NoError(t, err, "expected no error signing vote")
|
||||
@@ -207,8 +207,8 @@ func TestSignProposal(t *testing.T) {
|
||||
|
||||
privVal := GenFilePV(tempKeyFile.Name(), tempStateFile.Name())
|
||||
|
||||
block1 := types.BlockID{[]byte{1, 2, 3}, types.PartSetHeader{5, []byte{1, 2, 3}}}
|
||||
block2 := types.BlockID{[]byte{3, 2, 1}, types.PartSetHeader{10, []byte{3, 2, 1}}}
|
||||
block1 := types.BlockID{Hash: []byte{1, 2, 3}, PartsHeader: types.PartSetHeader{Total: 5, Hash: []byte{1, 2, 3}}}
|
||||
block2 := types.BlockID{Hash: []byte{3, 2, 1}, PartsHeader: types.PartSetHeader{Total: 10, Hash: []byte{3, 2, 1}}}
|
||||
height, round := int64(10), 1
|
||||
|
||||
// sign a proposal for first time
|
||||
|
||||
@@ -211,7 +211,7 @@ func TestSignerSignVoteErrors(t *testing.T) {
|
||||
}
|
||||
|
||||
type BrokenSignerDialerEndpoint struct {
|
||||
SignerDialerEndpoint
|
||||
*SignerDialerEndpoint
|
||||
}
|
||||
|
||||
func (ss *BrokenSignerDialerEndpoint) writeMessage(msg RemoteSignerMsg) (err error) {
|
||||
@@ -229,7 +229,7 @@ func TestSignerUnexpectedResponse(t *testing.T) {
|
||||
|
||||
// Replace signer service with a broken one
|
||||
tc.signerService.OnStop()
|
||||
tmp := BrokenSignerDialerEndpoint{*tc.signerService}
|
||||
tmp := BrokenSignerDialerEndpoint{tc.signerService}
|
||||
tmp.OnStart()
|
||||
|
||||
defer tmp.OnStop()
|
||||
|
||||
@@ -112,7 +112,7 @@ func (ss *SignerDialerEndpoint) serviceLoop() {
|
||||
defer close(ss.stoppedCh)
|
||||
|
||||
retries := 0
|
||||
var err error = nil
|
||||
var err error
|
||||
|
||||
for {
|
||||
select {
|
||||
@@ -130,7 +130,7 @@ func (ss *SignerDialerEndpoint) serviceLoop() {
|
||||
|
||||
if err != nil {
|
||||
ss.conn = nil // Explicitly set to nil because dialer returns an interface (https://golang.org/doc/faq#nil_error)
|
||||
retries += 1
|
||||
retries++
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user