Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sealing: flag to run data_cid untied from addpiece #10795

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion cmd/lotus-worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ var runCmd = &cli.Command{
Name: "http-server-timeout",
Value: "30s",
},
&cli.BoolFlag{
Name: "data-cid",
Usage: "Run the data-cid task. --add-piece defaults this to true unless overridden",
Value: true,
},
},
Before: func(cctx *cli.Context) error {
if cctx.IsSet("address") {
Expand Down Expand Up @@ -380,8 +385,14 @@ var runCmd = &cli.Command{
}
}

ttDataCidDefault := false
if (workerType == sealtasks.WorkerSealing || cctx.IsSet("addpiece")) && cctx.Bool("addpiece") {
taskTypes = append(taskTypes, sealtasks.TTAddPiece, sealtasks.TTDataCid)
taskTypes = append(taskTypes, sealtasks.TTAddPiece)
ttDataCidDefault = true
}
if (cctx.IsSet("data-cid") && cctx.Bool("data-cid")) ||
(!cctx.IsSet("data-cid") && ttDataCidDefault) {
taskTypes = append(taskTypes, sealtasks.TTDataCid)
}
if (workerType == sealtasks.WorkerSealing || cctx.IsSet("sector-download")) && cctx.Bool("sector-download") {
taskTypes = append(taskTypes, sealtasks.TTDownloadSector)
Expand Down