diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-23 20:48:44 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-23 20:48:44 +0800 |
commit | 4cd79d8ddd7608d60344b13fe4bda7315429d1d9 (patch) | |
tree | 0d1abaa9ef5c302c1ef51e8e8dbd94e9e696f28a /core/vm_env.go | |
parent | 4b52cd512d3c54451e680fcc6c3d67d059065bec (diff) | |
download | go-tangerine-4cd79d8ddd7608d60344b13fe4bda7315429d1d9.tar.gz go-tangerine-4cd79d8ddd7608d60344b13fe4bda7315429d1d9.tar.zst go-tangerine-4cd79d8ddd7608d60344b13fe4bda7315429d1d9.zip |
Refactored block & Transaction
* Includes new rlp decoder
Diffstat (limited to 'core/vm_env.go')
-rw-r--r-- | core/vm_env.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/vm_env.go b/core/vm_env.go index ad63ecf9c..209115eab 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -24,15 +24,15 @@ func NewEnv(state *state.StateDB, msg Message, block *types.Block) *VMEnv { } func (self *VMEnv) Origin() []byte { return self.msg.From() } -func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number } -func (self *VMEnv) PrevHash() []byte { return self.block.PrevHash } -func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase } -func (self *VMEnv) Time() int64 { return self.block.Time } -func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty } +func (self *VMEnv) BlockNumber() *big.Int { return self.block.Number() } +func (self *VMEnv) PrevHash() []byte { return self.block.ParentHash() } +func (self *VMEnv) Coinbase() []byte { return self.block.Coinbase() } +func (self *VMEnv) Time() int64 { return self.block.Time() } +func (self *VMEnv) Difficulty() *big.Int { return self.block.Difficulty() } func (self *VMEnv) BlockHash() []byte { return self.block.Hash() } +func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit() } func (self *VMEnv) Value() *big.Int { return self.msg.Value() } func (self *VMEnv) State() *state.StateDB { return self.state } -func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit } func (self *VMEnv) Depth() int { return self.depth } func (self *VMEnv) SetDepth(i int) { self.depth = i } func (self *VMEnv) AddLog(log state.Log) { |