diff options
Diffstat (limited to 'core/vm_env.go')
-rw-r--r-- | core/vm_env.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/vm_env.go b/core/vm_env.go index 624a63333..c7491bcdc 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -14,6 +14,7 @@ type VMEnv struct { msg Message depth int chain *ChainManager + typ vm.Type } func NewEnv(state *state.StateDB, chain *ChainManager, msg Message, block *types.Block) *VMEnv { @@ -22,6 +23,7 @@ func NewEnv(state *state.StateDB, chain *ChainManager, msg Message, block *types state: state, block: block, msg: msg, + typ: vm.StdVmTy, } } @@ -35,6 +37,8 @@ func (self *VMEnv) Value() *big.Int { return self.msg.Value() } func (self *VMEnv) State() *state.StateDB { return self.state } func (self *VMEnv) Depth() int { return self.depth } func (self *VMEnv) SetDepth(i int) { self.depth = i } +func (self *VMEnv) VmType() vm.Type { return self.typ } +func (self *VMEnv) SetVmType(t vm.Type) { self.typ = t } func (self *VMEnv) GetHash(n uint64) []byte { if block := self.chain.GetBlockByNumber(n); block != nil { return block.Hash() |