forked from cerc-io/plugeth
all: new empty trie with types.EmptyRootHash instead of null (#27230)
This commit is contained in:
@@ -286,7 +286,7 @@ func (t *StateTest) gasLimit(subtest StateSubtest) uint64 {
|
||||
|
||||
func MakePreState(db ethdb.Database, accounts core.GenesisAlloc, snapshotter bool) (*snapshot.Tree, *state.StateDB) {
|
||||
sdb := state.NewDatabaseWithConfig(db, &trie.Config{Preimages: true})
|
||||
statedb, _ := state.New(common.Hash{}, sdb, nil)
|
||||
statedb, _ := state.New(types.EmptyRootHash, sdb, nil)
|
||||
for addr, a := range accounts {
|
||||
statedb.SetCode(addr, a.Code)
|
||||
statedb.SetNonce(addr, a.Nonce)
|
||||
|
||||
Reference in New Issue
Block a user