Reduce nesting in sectors list command

This commit is contained in:
Łukasz Magiera 2021-09-02 21:45:55 +02:00
parent e4044151f0
commit 186c4990dd

View File

@ -389,7 +389,10 @@ var sectorsListCmd = &cli.Command{
continue continue
} }
if showRemoved || st.State != api.SectorState(sealing.Removed) { if !showRemoved && st.State == api.SectorState(sealing.Removed) {
continue
}
_, inSSet := commitedIDs[s] _, inSSet := commitedIDs[s]
_, inASet := activeIDs[s] _, inASet := activeIDs[s]
@ -511,7 +514,6 @@ var sectorsListCmd = &cli.Command{
tw.Write(m) tw.Write(m)
} }
}
return tw.Flush(os.Stdout) return tw.Flush(os.Stdout)
}, },