From 8c31ea1814168f3ab8ece2685d4993a2312c58b1 Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Mon, 1 May 2023 19:41:44 -0500 Subject: [PATCH] feat: sealing: data_cid flag untied from addpiece --- cmd/lotus-worker/main.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cmd/lotus-worker/main.go b/cmd/lotus-worker/main.go index e0a931274..600e272bf 100644 --- a/cmd/lotus-worker/main.go +++ b/cmd/lotus-worker/main.go @@ -275,6 +275,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") { @@ -379,8 +384,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)