lint fixes

This commit is contained in:
Zach Ramsay 2017-10-28 11:07:59 -04:00 committed by Ethan Buchman
parent 6f3c05545d
commit 2563b4fc92
3 changed files with 7 additions and 6 deletions

View File

@ -90,7 +90,6 @@ metalinter_test: ensure_tools
--enable=deadcode \ --enable=deadcode \
--enable=gas \ --enable=gas \
--enable=gosimple \ --enable=gosimple \
--enable=ineffassign \
--enable=misspell \ --enable=misspell \
--enable=safesql \ --enable=safesql \
--enable=structcheck \ --enable=structcheck \
@ -105,6 +104,7 @@ metalinter_test: ensure_tools
#--enable=goimports \ #--enable=goimports \
#--enable=golint \ <== comments on anything exported #--enable=golint \ <== comments on anything exported
#--enable=gotype \ #--enable=gotype \
#--enable=ineffassign \
#--enable=interfacer \ #--enable=interfacer \
#--enable=megacheck \ #--enable=megacheck \
#--enable=staticcheck \ #--enable=staticcheck \

View File

@ -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 { func (pool *BlockPool) MaxPeerHeight() int {
pool.mtx.Lock() pool.mtx.Lock()
defer pool.mtx.Unlock() defer pool.mtx.Unlock()

View File

@ -7,12 +7,12 @@ import (
"hash/crc32" "hash/crc32"
"io" "io"
"reflect" "reflect"
"strconv" //"strconv"
"strings" //"strings"
"time" "time"
abci "github.com/tendermint/abci/types" abci "github.com/tendermint/abci/types"
auto "github.com/tendermint/tmlibs/autofile" //auto "github.com/tendermint/tmlibs/autofile"
cmn "github.com/tendermint/tmlibs/common" cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tmlibs/log" "github.com/tendermint/tmlibs/log"
@ -152,6 +152,7 @@ func (cs *ConsensusState) catchupReplay(csHeight int) error {
// Parses marker lines of the form: // Parses marker lines of the form:
// #ENDHEIGHT: 12345 // #ENDHEIGHT: 12345
/*
func makeHeightSearchFunc(height int) auto.SearchFunc { func makeHeightSearchFunc(height int) auto.SearchFunc {
return func(line string) (int, error) { return func(line string) (int, error) {
line = strings.TrimRight(line, "\n") line = strings.TrimRight(line, "\n")
@ -171,7 +172,7 @@ func makeHeightSearchFunc(height int) auto.SearchFunc {
return -1, nil return -1, nil
} }
} }
} }*/
//---------------------------------------------- //----------------------------------------------
// Recover from failure during block processing // Recover from failure during block processing