fix more ineffassign errors

This commit is contained in:
Anton Kaliaev
2019-03-07 00:28:23 +04:00
parent 9257f7f79e
commit ecd5fea1ef
4 changed files with 5 additions and 3 deletions

View File

@ -93,6 +93,7 @@ func _TestAppProofs(t *testing.T) {
// verify a query before the tx block has no data (and valid non-exist proof) // verify a query before the tx block has no data (and valid non-exist proof)
bs, height, proof, err := GetWithProof(prt, k, brh-1, cl, cert) bs, height, proof, err := GetWithProof(prt, k, brh-1, cl, cert)
require.NoError(err, "%#v", err) require.NoError(err, "%#v", err)
require.NotNil(proof)
require.Equal(height, brh-1) require.Equal(height, brh-1)
// require.NotNil(proof) // require.NotNil(proof)
// TODO: Ensure that *some* keys will be there, ensuring that proof is nil, // TODO: Ensure that *some* keys will be there, ensuring that proof is nil,

View File

@ -495,8 +495,7 @@ func TestMConnectionReadErrorUnknownMsgType(t *testing.T) {
defer mconnServer.Stop() defer mconnServer.Stop()
// send msg with unknown msg type // send msg with unknown msg type
err := error(nil) err := amino.EncodeUvarint(mconnClient.conn, 4)
err = amino.EncodeUvarint(mconnClient.conn, 4)
assert.Nil(t, err) assert.Nil(t, err)
_, err = mconnClient.conn.Write([]byte{0xFF, 0xFF, 0xFF, 0xFF}) _, err = mconnClient.conn.Write([]byte{0xFF, 0xFF, 0xFF, 0xFF})
assert.Nil(t, err) assert.Nil(t, err)

View File

@ -44,7 +44,7 @@ func TestApplyBlock(t *testing.T) {
blockID := types.BlockID{block.Hash(), block.MakePartSet(testPartSize).Header()} blockID := types.BlockID{block.Hash(), block.MakePartSet(testPartSize).Header()}
//nolint:ineffassign //nolint:ineffassign
state, err = blockExec.ApplyBlock(state, blockID, block) state, err = blockExec.ApplyBlock(state, blockID, block)
require.Nil(t, err) require.Nil(t, err)
// TODO check state and mempool // TODO check state and mempool

View File

@ -668,6 +668,7 @@ func TestLargeGenesisValidator(t *testing.T) {
blockID := types.BlockID{block.Hash(), block.MakePartSet(testPartSize).Header()} blockID := types.BlockID{block.Hash(), block.MakePartSet(testPartSize).Header()}
updatedState, err := updateState(oldState, blockID, &block.Header, abciResponses, validatorUpdates) updatedState, err := updateState(oldState, blockID, &block.Header, abciResponses, validatorUpdates)
require.NoError(t, err)
// no changes in voting power (ProposerPrio += VotingPower == Voting in 1st round; than shiftByAvg == 0, // no changes in voting power (ProposerPrio += VotingPower == Voting in 1st round; than shiftByAvg == 0,
// than -Total == -Voting) // than -Total == -Voting)
// -> no change in ProposerPrio (stays zero): // -> no change in ProposerPrio (stays zero):
@ -692,6 +693,7 @@ func TestLargeGenesisValidator(t *testing.T) {
block := makeBlock(oldState, oldState.LastBlockHeight+1) block := makeBlock(oldState, oldState.LastBlockHeight+1)
blockID := types.BlockID{block.Hash(), block.MakePartSet(testPartSize).Header()} blockID := types.BlockID{block.Hash(), block.MakePartSet(testPartSize).Header()}
updatedState, err := updateState(oldState, blockID, &block.Header, abciResponses, validatorUpdates) updatedState, err := updateState(oldState, blockID, &block.Header, abciResponses, validatorUpdates)
require.NoError(t, err)
lastState := updatedState lastState := updatedState
for i := 0; i < 200; i++ { for i := 0; i < 200; i++ {