Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Brindrajsinh-Chauhan committed May 6, 2024
1 parent 3625d4a commit 0b8f159
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/state_test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,16 @@ func MakePreState(db ethdb.Database, accounts core.GenesisAlloc, snapshotter boo
}
// Commit and re-open to start with a clean state.
root, _ := statedb.Commit(false)

snapConfig := snapshot.Config{
CacheSize: 1,
Recovery: false,
ReBuild: true,
AsyncBuild: false,
AllowForceUpdate: false,
}
var snaps *snapshot.Tree
if snapshotter {
snaps, _ = snapshot.New(db, sdb.TrieDB(), 1, root, false, true, false)
snaps, _ = snapshot.New(snapConfig, db, sdb.TrieDB(), root)
}
statedb, _ = state.New(root, sdb, snaps)
return snaps, statedb
Expand Down

0 comments on commit 0b8f159

Please sign in to comment.