From 32b929e781c358294d42da6a4c8222d5de545fac Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Sat, 26 Jul 2025 17:41:56 +0800 Subject: [PATCH] core/vm/runtime: add Random field to config #28001 (#1234) --- core/vm/runtime/env.go | 1 + core/vm/runtime/runtime.go | 1 + 2 files changed, 2 insertions(+) diff --git a/core/vm/runtime/env.go b/core/vm/runtime/env.go index d525e8b312..233d132ba4 100644 --- a/core/vm/runtime/env.go +++ b/core/vm/runtime/env.go @@ -36,6 +36,7 @@ func NewEnv(cfg *Config) *vm.EVM { Difficulty: cfg.Difficulty, GasLimit: cfg.GasLimit, BaseFee: cfg.BaseFee, + Random: cfg.Random, } return vm.NewEVM(blockContext, txContext, cfg.State, nil, cfg.ChainConfig, cfg.EVMConfig) diff --git a/core/vm/runtime/runtime.go b/core/vm/runtime/runtime.go index fe3e0df728..757498ce5d 100644 --- a/core/vm/runtime/runtime.go +++ b/core/vm/runtime/runtime.go @@ -45,6 +45,7 @@ type Config struct { Debug bool EVMConfig vm.Config BaseFee *big.Int + Random *common.Hash State *state.StateDB GetHashFn func(n uint64) common.Hash