core: fix broken tests due to API changes + linter
This commit is contained in:
@ -41,7 +41,7 @@ type testAccount struct {
|
||||
func makeTestState() (Database, common.Hash, []*testAccount) {
|
||||
// Create an empty state
|
||||
db := NewDatabase(rawdb.NewMemoryDatabase())
|
||||
state, _ := New(common.Hash{}, db)
|
||||
state, _ := New(common.Hash{}, db, nil)
|
||||
|
||||
// Fill it with some arbitrary data
|
||||
accounts := []*testAccount{}
|
||||
@ -72,7 +72,7 @@ func makeTestState() (Database, common.Hash, []*testAccount) {
|
||||
// account array.
|
||||
func checkStateAccounts(t *testing.T, db ethdb.Database, root common.Hash, accounts []*testAccount) {
|
||||
// Check root availability and state contents
|
||||
state, err := New(root, NewDatabase(db))
|
||||
state, err := New(root, NewDatabase(db), nil)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create state trie at %x: %v", root, err)
|
||||
}
|
||||
@ -113,7 +113,7 @@ func checkStateConsistency(db ethdb.Database, root common.Hash) error {
|
||||
if _, err := db.Get(root.Bytes()); err != nil {
|
||||
return nil // Consider a non existent state consistent.
|
||||
}
|
||||
state, err := New(root, NewDatabase(db))
|
||||
state, err := New(root, NewDatabase(db), nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user