Add tests for uncle timestamps and refactor timestamp type
This commit is contained in:
@ -135,7 +135,7 @@ type Env struct {
|
||||
coinbase common.Address
|
||||
|
||||
number *big.Int
|
||||
time uint64
|
||||
time *big.Int
|
||||
difficulty *big.Int
|
||||
gasLimit *big.Int
|
||||
|
||||
@ -165,7 +165,7 @@ func NewEnvFromMap(state *state.StateDB, envValues map[string]string, exeValues
|
||||
//env.parent = common.Hex2Bytes(envValues["previousHash"])
|
||||
env.coinbase = common.HexToAddress(envValues["currentCoinbase"])
|
||||
env.number = common.Big(envValues["currentNumber"])
|
||||
env.time = common.Big(envValues["currentTimestamp"]).Uint64()
|
||||
env.time = common.Big(envValues["currentTimestamp"])
|
||||
env.difficulty = common.Big(envValues["currentDifficulty"])
|
||||
env.gasLimit = common.Big(envValues["currentGasLimit"])
|
||||
env.Gas = new(big.Int)
|
||||
@ -178,7 +178,7 @@ func (self *Env) BlockNumber() *big.Int { return self.number }
|
||||
|
||||
//func (self *Env) PrevHash() []byte { return self.parent }
|
||||
func (self *Env) Coinbase() common.Address { return self.coinbase }
|
||||
func (self *Env) Time() uint64 { return self.time }
|
||||
func (self *Env) Time() *big.Int { return self.time }
|
||||
func (self *Env) Difficulty() *big.Int { return self.difficulty }
|
||||
func (self *Env) State() *state.StateDB { return self.state }
|
||||
func (self *Env) GasLimit() *big.Int { return self.gasLimit }
|
||||
|
Reference in New Issue
Block a user