mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
cmd/evm: fix prestate block number
This commit is contained in:
parent
807044be87
commit
21fa5d188d
1 changed files with 3 additions and 0 deletions
|
|
@ -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),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue