diff --git a/cmd/evm/internal/t8ntool/execution.go b/cmd/evm/internal/t8ntool/execution.go index 01d23052a877..5cd520092741 100644 --- a/cmd/evm/internal/t8ntool/execution.go +++ b/cmd/evm/internal/t8ntool/execution.go @@ -464,15 +464,15 @@ func MakePreState(db ethdb.Database, chainConfig *params.ChainConfig, pre *Prest } } + state.NoBanner() + // Commit db an create a snapshot from it. + mptRoot, err := statedb.Commit(0, false) + if err != nil { + panic(err) + } + // If verkle mode started, establish the conversion if verkle { - state.NoBanner() - // Commit db an create a snapshot from it. - mptRoot, err := statedb.Commit(0, false) - if err != nil { - panic(err) - } - // If the current tree is a VerkleTrie, it means the state conversion has ended. // We don't need to continue with conversion setups and can return early. if _, ok := statedb.GetTrie().(*trie.VerkleTrie); ok { @@ -553,6 +553,11 @@ func MakePreState(db ethdb.Database, chainConfig *params.ChainConfig, pre *Prest if err != nil { panic(err) } + } else { + statedb, err = state.New(mptRoot, sdb, nil) + if err != nil { + panic(err) + } } if statedb.Database().InTransition() || statedb.Database().Transitioned() {