mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
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:
parent
3006c4411b
commit
2ebca53bd6
2 changed files with 2 additions and 0 deletions
|
|
@ -41,6 +41,7 @@ func NewEnv(cfg *Config) *vm.EVM {
|
||||||
BaseFee: cfg.BaseFee,
|
BaseFee: cfg.BaseFee,
|
||||||
BlobBaseFee: cfg.BlobBaseFee,
|
BlobBaseFee: cfg.BlobBaseFee,
|
||||||
Random: cfg.Random,
|
Random: cfg.Random,
|
||||||
|
SlotNum: cfg.SlotNum,
|
||||||
CostPerStateByte: params.CostPerStateByte,
|
CostPerStateByte: params.CostPerStateByte,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ type Config struct {
|
||||||
BlobHashes []common.Hash
|
BlobHashes []common.Hash
|
||||||
BlobFeeCap *big.Int
|
BlobFeeCap *big.Int
|
||||||
Random *common.Hash
|
Random *common.Hash
|
||||||
|
SlotNum uint64
|
||||||
|
|
||||||
State *state.StateDB
|
State *state.StateDB
|
||||||
GetHashFn func(n uint64) common.Hash
|
GetHashFn func(n uint64) common.Hash
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue