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=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 \


+ 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 {
pool.mtx.Lock()
defer pool.mtx.Unlock()


+ 5
- 4
consensus/replay.go View File

@ -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


Loading…
Cancel
Save