cmd/evm: fix prestate block number

This commit is contained in:
cdetrio 2017-08-25 17:02:19 -04:00
parent 807044be87
commit 21fa5d188d

View file

@ -88,6 +88,7 @@ func runCmd(ctx *cli.Context) error {
genTimestamp uint64 genTimestamp uint64
genGasLimit uint64 genGasLimit uint64
genDifficulty *big.Int genDifficulty *big.Int
genNumber uint64
sender = common.StringToAddress("sender") sender = common.StringToAddress("sender")
receiver = common.StringToAddress("receiver") receiver = common.StringToAddress("receiver")
) )
@ -105,6 +106,7 @@ func runCmd(ctx *cli.Context) error {
genDifficulty = gen.Difficulty genDifficulty = gen.Difficulty
genGasLimit = gen.GasLimit genGasLimit = gen.GasLimit
genTimestamp = gen.Timestamp genTimestamp = gen.Timestamp
genNumber = gen.Number
_, statedb = gen.ToBlock() _, statedb = gen.ToBlock()
chainConfig = gen.Config chainConfig = gen.Config
} else { } else {
@ -167,6 +169,7 @@ func runCmd(ctx *cli.Context) error {
Time: new(big.Int).SetUint64(genTimestamp), Time: new(big.Int).SetUint64(genTimestamp),
Coinbase: genCoinbase, Coinbase: genCoinbase,
Difficulty: genDifficulty, Difficulty: genDifficulty,
BlockNumber: new(big.Int).SetUint64(genNumber),
State: statedb, State: statedb,
GasLimit: genGasLimit, GasLimit: genGasLimit,
GasPrice: utils.GlobalBig(ctx, PriceFlag.Name), GasPrice: utils.GlobalBig(ctx, PriceFlag.Name),