Browse Source

lint fixes

pull/703/head
Zach Ramsay 7 years ago
committed by Ethan Buchman
parent
commit
2563b4fc92
3 changed files with 7 additions and 6 deletions
  1. +1
    -1
      Makefile
  2. +1
    -1
      blockchain/pool.go
  3. +5
    -4
      consensus/replay.go

+ 1
- 1
Makefile 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 \


+ 1
- 1
blockchain/pool.go 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()


+ 5
- 4
consensus/replay.go View File

@ -7,12 +7,12 @@ import (
"hash/crc32" "hash/crc32"
"io" "io"
"reflect" "reflect"
"strconv"
"strings"
//"strconv"
//"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


Loading…
Cancel
Save