aboutsummaryrefslogtreecommitdiffstats
path: root/tests/block_test_util.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/block_test_util.go')
-rw-r--r--tests/block_test_util.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go
index b9678a77b..24d4672b6 100644
--- a/tests/block_test_util.go
+++ b/tests/block_test_util.go
@@ -204,7 +204,7 @@ func runBlockTest(homesteadBlock, daoForkBlock, gasPriceFork *big.Int, test *Blo
// InsertPreState populates the given database with the genesis
// accounts defined by the test.
func (t *BlockTest) InsertPreState(db ethdb.Database) (*state.StateDB, error) {
- statedb, err := state.New(common.Hash{}, db)
+ statedb, err := state.New(common.Hash{}, state.NewDatabase(db))
if err != nil {
return nil, err
}
@@ -232,7 +232,7 @@ func (t *BlockTest) InsertPreState(db ethdb.Database) (*state.StateDB, error) {
}
}
- root, err := statedb.Commit(false)
+ root, err := statedb.CommitTo(db, false)
if err != nil {
return nil, fmt.Errorf("error writing state: %v", err)
}