From a7d09cc14ff5a3e88a4ed328354f918cc2ca0b69 Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Mon, 16 Mar 2026 16:45:26 +0800 Subject: [PATCH] core: fix code database initialization in stateless mode (#34011) This PR fixes the statedb initialization, ensuring the data source is bound with the stateless input. --- core/stateless.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/stateless.go b/core/stateless.go index 88d8ed8138..86d4dc304b 100644 --- a/core/stateless.go +++ b/core/stateless.go @@ -53,7 +53,7 @@ func ExecuteStateless(ctx context.Context, config *params.ChainConfig, vmconfig } // Create and populate the state database to serve as the stateless backend memdb := witness.MakeHashDB() - db, err := state.New(witness.Root(), state.NewDatabase(triedb.NewDatabase(memdb, triedb.HashDefaults), nil)) + db, err := state.New(witness.Root(), state.NewDatabase(triedb.NewDatabase(memdb, triedb.HashDefaults), state.NewCodeDB(memdb))) if err != nil { return common.Hash{}, common.Hash{}, err }