From 0256ea826889b25aec399d198165c9a71b91a38e Mon Sep 17 00:00:00 2001 From: wenxin <85589661@qq.com> Date: Fri, 19 Nov 2021 13:56:58 +0800 Subject: [PATCH 1/2] Fix the bug of SetConfig exception --- config/local_storage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/local_storage.go b/config/local_storage.go index 85b43b83..6ec836fa 100644 --- a/config/local_storage.go +++ b/config/local_storage.go @@ -99,7 +99,7 @@ func (fsr *LocalStorage) SetConfig(c func(interface{})) error { fsr.configLk.Lock() defer fsr.configLk.Unlock() - cfg, err := MinerFromFile(fsr.configPath) + cfg, err := MinerFromFile(FsConfig(fsr.configPath)) if err != nil { return err } @@ -117,7 +117,7 @@ func (fsr *LocalStorage) SetConfig(c func(interface{})) error { } // write buffer of TOML bytes to config file - err = ioutil.WriteFile(fsr.configPath, buf.Bytes(), 0644) + err = ioutil.WriteFile(FsConfig(fsr.configPath), buf.Bytes(), 0644) if err != nil { return err } From 6a0877db3cc9e190ac3982b4155efe315743a797 Mon Sep 17 00:00:00 2001 From: wenxin <85589661@qq.com> Date: Fri, 19 Nov 2021 10:48:29 +0800 Subject: [PATCH 2/2] Missing some color schemes for sector status --- app/venus-sealer/util.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/venus-sealer/util.go b/app/venus-sealer/util.go index 82204435..b1e378ed 100644 --- a/app/venus-sealer/util.go +++ b/app/venus-sealer/util.go @@ -88,6 +88,7 @@ var stateList = []stateMeta{ {col: color.FgBlue, state: types.Empty}, {col: color.FgBlue, state: types.WaitDeals}, + {col: color.FgBlue, state: types.AddPiece}, {col: color.FgRed, state: types.UndefinedSectorState}, {col: color.FgYellow, state: types.Packing}, @@ -96,10 +97,15 @@ var stateList = []stateMeta{ {col: color.FgYellow, state: types.PreCommit2}, {col: color.FgYellow, state: types.PreCommitting}, {col: color.FgYellow, state: types.PreCommitWait}, + {col: color.FgYellow, state: types.SubmitPreCommitBatch}, + {col: color.FgYellow, state: types.PreCommitBatchWait}, {col: color.FgYellow, state: types.WaitSeed}, {col: color.FgYellow, state: types.Committing}, + {col: color.FgYellow, state: types.CommitFinalize}, {col: color.FgYellow, state: types.SubmitCommit}, {col: color.FgYellow, state: types.CommitWait}, + {col: color.FgYellow, state: types.SubmitCommitAggregate}, + {col: color.FgYellow, state: types.CommitAggregateWait}, {col: color.FgYellow, state: types.FinalizeSector}, {col: color.FgCyan, state: types.Terminating}, @@ -110,11 +116,13 @@ var stateList = []stateMeta{ {col: color.FgCyan, state: types.Removed}, {col: color.FgRed, state: types.FailedUnrecoverable}, + {col: color.FgRed, state: types.AddPieceFailed}, {col: color.FgRed, state: types.SealPreCommit1Failed}, {col: color.FgRed, state: types.SealPreCommit2Failed}, {col: color.FgRed, state: types.PreCommitFailed}, {col: color.FgRed, state: types.ComputeProofFailed}, {col: color.FgRed, state: types.CommitFailed}, + {col: color.FgRed, state: types.CommitFinalizeFailed}, {col: color.FgRed, state: types.PackingFailed}, {col: color.FgRed, state: types.FinalizeFailed}, {col: color.FgRed, state: types.Faulty},