diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-08-24 08:52:53 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-08-25 10:46:11 +0800 |
commit | 7324176f702a77fc331bf16a968d2eb4bccce021 (patch) | |
tree | a9fef3b9ee46fc382dde23cdd90209cc4298dd59 /cmd/evm/main.go | |
parent | d51d0022cee91d6588186455afbe6e54fae2cbf7 (diff) | |
download | dexon-7324176f702a77fc331bf16a968d2eb4bccce021.tar dexon-7324176f702a77fc331bf16a968d2eb4bccce021.tar.gz dexon-7324176f702a77fc331bf16a968d2eb4bccce021.tar.bz2 dexon-7324176f702a77fc331bf16a968d2eb4bccce021.tar.lz dexon-7324176f702a77fc331bf16a968d2eb4bccce021.tar.xz dexon-7324176f702a77fc331bf16a968d2eb4bccce021.tar.zst dexon-7324176f702a77fc331bf16a968d2eb4bccce021.zip |
Add tests for uncle timestamps and refactor timestamp type
Diffstat (limited to 'cmd/evm/main.go')
-rw-r--r-- | cmd/evm/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 6639069b9..243dd6266 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -166,7 +166,7 @@ type VMEnv struct { depth int Gas *big.Int - time uint64 + time *big.Int logs []vm.StructLog } @@ -175,7 +175,7 @@ func NewEnv(state *state.StateDB, transactor common.Address, value *big.Int) *VM state: state, transactor: &transactor, value: value, - time: uint64(time.Now().Unix()), + time: big.NewInt(time.Now().Unix()), } } @@ -183,7 +183,7 @@ func (self *VMEnv) State() *state.StateDB { return self.state } func (self *VMEnv) Origin() common.Address { return *self.transactor } func (self *VMEnv) BlockNumber() *big.Int { return common.Big0 } func (self *VMEnv) Coinbase() common.Address { return *self.transactor } -func (self *VMEnv) Time() uint64 { return self.time } +func (self *VMEnv) Time() *big.Int { return self.time } func (self *VMEnv) Difficulty() *big.Int { return common.Big1 } func (self *VMEnv) BlockHash() []byte { return make([]byte, 32) } func (self *VMEnv) Value() *big.Int { return self.value } |