Skip to content

Commit bf16eba

Browse files
committed
cmd/workload: fix flags
1 parent df3d3ab commit bf16eba

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/workload/prooftestgen.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func generateProofTests(clictx *cli.Context) error {
289289
outputFile = clictx.String(proofTestFileFlag.Name)
290290
outputDir = clictx.String(proofTestResultOutputFlag.Name)
291291
startBlock = clictx.Uint64(proofTestStartBlockFlag.Name)
292-
endBlock = clictx.Uint64(traceTestEndBlockFlag.Name)
292+
endBlock = clictx.Uint64(proofTestEndBlockFlag.Name)
293293
)
294294
head, err := client.Eth.BlockNumber(ctx)
295295
if err != nil {
@@ -298,6 +298,11 @@ func generateProofTests(clictx *cli.Context) error {
298298
if startBlock > head || endBlock > head {
299299
return fmt.Errorf("chain is out of proof range, head %d, start: %d, limit: %d", head, startBlock, endBlock)
300300
}
301+
if endBlock == 0 {
302+
endBlock = head
303+
}
304+
log.Info("Generating proof states", "startBlock", startBlock, "endBlock", endBlock, "states", states)
305+
301306
test, err := genProofRequests(client, startBlock, endBlock, states)
302307
if err != nil {
303308
exit(err)

0 commit comments

Comments
 (0)