diff --git a/cmd/lotus-bench/main.go b/cmd/lotus-bench/main.go index a4e52a2df..54a8a7c36 100644 --- a/cmd/lotus-bench/main.go +++ b/cmd/lotus-bench/main.go @@ -137,11 +137,11 @@ func main() { if err != nil { return err } - /*defer func() { + defer func() { if err := os.RemoveAll(tsdir); err != nil { log.Warn("remove all: ", err) } - }()*/ + }() sbdir = tsdir } else { exp, err := homedir.Expand(robench) diff --git a/cmd/lotus-seal-worker/main.go b/cmd/lotus-seal-worker/main.go index 699a2bb04..0f7d50f5e 100644 --- a/cmd/lotus-seal-worker/main.go +++ b/cmd/lotus-seal-worker/main.go @@ -49,7 +49,7 @@ func main() { Version: build.UserVersion, Flags: []cli.Flag{ &cli.StringFlag{ - Name: "workerrepo", + Name: FlagStorageRepo, EnvVars: []string{"WORKER_PATH"}, Value: "~/.lotusworker", // TODO: Consider XDG_DATA_HOME }, @@ -261,7 +261,7 @@ var runCmd = &cli.Command{ log.Warn("Graceful shutdown successful") }() - nl, err := net.Listen("tcp4", cctx.String("address")) + nl, err := net.Listen("tcp", cctx.String("address")) if err != nil { return err } diff --git a/cmd/lotus-storage-miner/storage.go b/cmd/lotus-storage-miner/storage.go index 0293b4328..144c8e5eb 100644 --- a/cmd/lotus-storage-miner/storage.go +++ b/cmd/lotus-storage-miner/storage.go @@ -135,27 +135,37 @@ var storageListCmd = &cli.Command{ } for id, sectors := range st { - var u, s, c int + var cnt [3]int for _, decl := range sectors { - if decl.SectorFileType§orbuilder.FTUnsealed > 0 { - u++ - } - if decl.SectorFileType§orbuilder.FTSealed > 0 { - s++ - } - if decl.SectorFileType§orbuilder.FTCache > 0 { - c++ + for i := range cnt { + if decl.SectorFileType&(1<