core/state: fix staticcheck warnings (#20357)

Also remove dependency on gopkg.in/check.v1 in tests.
This commit is contained in:
Felix Lange
2019-11-22 15:56:05 +01:00
committed by GitHub
parent 36a684ca1e
commit dd21f079e8
7 changed files with 211 additions and 228 deletions

View File

@ -29,8 +29,6 @@ import (
"testing"
"testing/quick"
"gopkg.in/check.v1"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/types"
@ -458,7 +456,8 @@ func (test *snapshotTest) checkEqual(state, checkstate *StateDB) error {
return nil
}
func (s *StateSuite) TestTouchDelete(c *check.C) {
func TestTouchDelete(t *testing.T) {
s := newStateTest()
s.state.GetOrNewStateObject(common.Address{})
root, _ := s.state.Commit(false)
s.state.Reset(root)
@ -467,11 +466,11 @@ func (s *StateSuite) TestTouchDelete(c *check.C) {
s.state.AddBalance(common.Address{}, new(big.Int))
if len(s.state.journal.dirties) != 1 {
c.Fatal("expected one dirty state object")
t.Fatal("expected one dirty state object")
}
s.state.RevertToSnapshot(snapshot)
if len(s.state.journal.dirties) != 0 {
c.Fatal("expected no dirty state object")
t.Fatal("expected no dirty state object")
}
}