mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
cmd/workload: fix flags
This commit is contained in:
parent
e84c677bd8
commit
59734034d3
1 changed files with 6 additions and 1 deletions
|
|
@ -289,7 +289,7 @@ func generateProofTests(clictx *cli.Context) error {
|
|||
outputFile = clictx.String(proofTestFileFlag.Name)
|
||||
outputDir = clictx.String(proofTestResultOutputFlag.Name)
|
||||
startBlock = clictx.Uint64(proofTestStartBlockFlag.Name)
|
||||
endBlock = clictx.Uint64(traceTestEndBlockFlag.Name)
|
||||
endBlock = clictx.Uint64(proofTestEndBlockFlag.Name)
|
||||
)
|
||||
head, err := client.Eth.BlockNumber(ctx)
|
||||
if err != nil {
|
||||
|
|
@ -298,6 +298,11 @@ func generateProofTests(clictx *cli.Context) error {
|
|||
if startBlock > head || endBlock > head {
|
||||
return fmt.Errorf("chain is out of proof range, head %d, start: %d, limit: %d", head, startBlock, endBlock)
|
||||
}
|
||||
if endBlock == 0 {
|
||||
endBlock = head
|
||||
}
|
||||
log.Info("Generating proof states", "startBlock", startBlock, "endBlock", endBlock, "states", states)
|
||||
|
||||
test, err := genProofRequests(client, startBlock, endBlock, states)
|
||||
if err != nil {
|
||||
exit(err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue