mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +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)
|
outputFile = clictx.String(proofTestFileFlag.Name)
|
||||||
outputDir = clictx.String(proofTestResultOutputFlag.Name)
|
outputDir = clictx.String(proofTestResultOutputFlag.Name)
|
||||||
startBlock = clictx.Uint64(proofTestStartBlockFlag.Name)
|
startBlock = clictx.Uint64(proofTestStartBlockFlag.Name)
|
||||||
endBlock = clictx.Uint64(traceTestEndBlockFlag.Name)
|
endBlock = clictx.Uint64(proofTestEndBlockFlag.Name)
|
||||||
)
|
)
|
||||||
head, err := client.Eth.BlockNumber(ctx)
|
head, err := client.Eth.BlockNumber(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -298,6 +298,11 @@ func generateProofTests(clictx *cli.Context) error {
|
||||||
if startBlock > head || endBlock > head {
|
if startBlock > head || endBlock > head {
|
||||||
return fmt.Errorf("chain is out of proof range, head %d, start: %d, limit: %d", head, startBlock, endBlock)
|
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)
|
test, err := genProofRequests(client, startBlock, endBlock, states)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
exit(err)
|
exit(err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue