Merge pull request #1711 from Gustav-Simonsson/timestamp_big_int
Add tests for uncle timestamps and refactor timestamp type (cherry picked from commitabce09954b
) (cherry picked from commitfd512fa12c
) Conflicts: core/vm/instructions.go core/vm/jit_test.go
This commit is contained in:
committed by
Gustav Simonsson
parent
5c11d1033d
commit
2d1ea1a66d
@ -152,7 +152,7 @@ type VMEnv struct {
|
||||
|
||||
depth int
|
||||
Gas *big.Int
|
||||
time uint64
|
||||
time *big.Int
|
||||
logs []vm.StructLog
|
||||
}
|
||||
|
||||
@ -161,7 +161,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()),
|
||||
}
|
||||
}
|
||||
|
||||
@ -169,7 +169,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 }
|
||||
|
Reference in New Issue
Block a user