core/vm/runtime: propagate SlotNum to EVM block context

Expose SlotNum in runtime.Config so the SLOTNUM opcode returns the
expected value when executing via the runtime package.
This commit is contained in:
Weixie Cui 2026-07-03 20:00:00 +08:00
parent 3006c4411b
commit 2ebca53bd6
2 changed files with 2 additions and 0 deletions

View file

@ -41,6 +41,7 @@ func NewEnv(cfg *Config) *vm.EVM {
BaseFee: cfg.BaseFee,
BlobBaseFee: cfg.BlobBaseFee,
Random: cfg.Random,
SlotNum: cfg.SlotNum,
CostPerStateByte: params.CostPerStateByte,
}

View file

@ -49,6 +49,7 @@ type Config struct {
BlobHashes []common.Hash
BlobFeeCap *big.Int
Random *common.Hash
SlotNum uint64
State *state.StateDB
GetHashFn func(n uint64) common.Hash