mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
core: apply megacheck vet tool (unused, gosimple, staticcheck)
This commit is contained in:
@@ -155,18 +155,6 @@ func updateValidators(validators *types.ValidatorSet, changedValidators []*abci.
|
||||
return nil
|
||||
}
|
||||
|
||||
// return a bit array of validators that signed the last commit
|
||||
// NOTE: assumes commits have already been authenticated
|
||||
func commitBitArrayFromBlock(block *types.Block) *cmn.BitArray {
|
||||
signed := cmn.NewBitArray(len(block.LastCommit.Precommits))
|
||||
for i, precommit := range block.LastCommit.Precommits {
|
||||
if precommit != nil {
|
||||
signed.SetIndex(i, true) // val_.LastCommitHeight = block.Height - 1
|
||||
}
|
||||
}
|
||||
return signed
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// Validate block
|
||||
|
||||
|
@@ -46,10 +46,6 @@ type State struct {
|
||||
|
||||
TxIndexer txindex.TxIndexer `json:"-"` // Transaction indexer.
|
||||
|
||||
// Intermediate results from processing
|
||||
// Persisted separately from the state
|
||||
abciResponses *ABCIResponses
|
||||
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
|
@@ -8,9 +8,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
abci "github.com/tendermint/abci/types"
|
||||
db "github.com/tendermint/tmlibs/db"
|
||||
"github.com/tendermint/tendermint/state/txindex"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
db "github.com/tendermint/tmlibs/db"
|
||||
)
|
||||
|
||||
func TestTxIndex(t *testing.T) {
|
||||
@@ -52,7 +52,7 @@ func benchmarkTxIndex(txsCount int, b *testing.B) {
|
||||
b.ResetTimer()
|
||||
|
||||
for n := 0; n < b.N; n++ {
|
||||
err = indexer.AddBatch(batch)
|
||||
_ = indexer.AddBatch(batch)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user