From 2563b4fc924e8e6902b52e0b20719d0217f5bd86 Mon Sep 17 00:00:00 2001 From: Zach Ramsay Date: Sat, 28 Oct 2017 11:07:59 -0400 Subject: [PATCH] lint fixes --- Makefile | 2 +- blockchain/pool.go | 2 +- consensus/replay.go | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 1c9f2f778..770ca2533 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,6 @@ metalinter_test: ensure_tools --enable=deadcode \ --enable=gas \ --enable=gosimple \ - --enable=ineffassign \ --enable=misspell \ --enable=safesql \ --enable=structcheck \ @@ -105,6 +104,7 @@ metalinter_test: ensure_tools #--enable=goimports \ #--enable=golint \ <== comments on anything exported #--enable=gotype \ + #--enable=ineffassign \ #--enable=interfacer \ #--enable=megacheck \ #--enable=staticcheck \ diff --git a/blockchain/pool.go b/blockchain/pool.go index 0791bdb00..1c5a78565 100644 --- a/blockchain/pool.go +++ b/blockchain/pool.go @@ -232,7 +232,7 @@ func (pool *BlockPool) AddBlock(peerID string, block *types.Block, blockSize int } } -// MaxPeerHeight returns the heighest height reported by a peer +// MaxPeerHeight returns the highest height reported by a peer. func (pool *BlockPool) MaxPeerHeight() int { pool.mtx.Lock() defer pool.mtx.Unlock() diff --git a/consensus/replay.go b/consensus/replay.go index 29772a2b7..b38dd3f42 100644 --- a/consensus/replay.go +++ b/consensus/replay.go @@ -7,12 +7,12 @@ import ( "hash/crc32" "io" "reflect" - "strconv" - "strings" + //"strconv" + //"strings" "time" abci "github.com/tendermint/abci/types" - auto "github.com/tendermint/tmlibs/autofile" + //auto "github.com/tendermint/tmlibs/autofile" cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/tmlibs/log" @@ -152,6 +152,7 @@ func (cs *ConsensusState) catchupReplay(csHeight int) error { // Parses marker lines of the form: // #ENDHEIGHT: 12345 +/* func makeHeightSearchFunc(height int) auto.SearchFunc { return func(line string) (int, error) { line = strings.TrimRight(line, "\n") @@ -171,7 +172,7 @@ func makeHeightSearchFunc(height int) auto.SearchFunc { return -1, nil } } -} +}*/ //---------------------------------------------- // Recover from failure during block processing