diff options
Diffstat (limited to 'core/vm_env.go')
-rw-r--r-- | core/vm_env.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/vm_env.go b/core/vm_env.go index 599672382..1c1110280 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -25,6 +25,8 @@ import ( "github.com/ethereum/go-ethereum/core/vm" ) +var IllegalCodeHashes map[common.Hash]struct{} + // GetHashFn returns a function for which the VM env can query block hashes through // up to the limit defined by the Yellow Paper and uses the given block chain // to query for information. @@ -47,6 +49,8 @@ type VMEnv struct { depth int // Current execution depth msg Message // Message appliod + CodeHashes []common.Hash // code hashes collected during execution + header *types.Header // Header information chain *BlockChain // Blockchain handle logs []vm.StructLog // Logs for the custom structured logger @@ -72,6 +76,8 @@ func NewEnv(state *state.StateDB, chainConfig *ChainConfig, chain *BlockChain, m return env } +func (self *VMEnv) MarkCodeHash(hash common.Hash) { self.CodeHashes = append(self.CodeHashes, hash) } + func (self *VMEnv) RuleSet() vm.RuleSet { return self.chainConfig } func (self *VMEnv) Vm() vm.Vm { return self.evm } func (self *VMEnv) Origin() common.Address { f, _ := self.msg.From(); return f } |