Skip to content

Commit

Permalink
fix: lmcli: make 'sectors list' DDO-aware
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k authored and rvagg committed Apr 8, 2024
1 parent 01e2496 commit ba11769
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/lotus-miner/sectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,13 @@ var sectorsListCmd = &cli.Command{
}
}

var pams int
for _, p := range st.Pieces {
if p.DealInfo != nil && p.DealInfo.PieceActivationManifest != nil {
pams++
}
}

exp := st.Expiration
if st.OnTime > 0 && st.OnTime < exp {
exp = st.OnTime // Can be different when the sector was CC upgraded
Expand All @@ -501,6 +508,8 @@ var sectorsListCmd = &cli.Command{

if deals > 0 {
m["Deals"] = color.GreenString("%d", deals)
} else if pams > 0 {
m["Deals"] = color.MagentaString("DDO:%d", pams)
} else {
m["Deals"] = color.BlueString("CC")
if st.ToUpgrade {
Expand Down

0 comments on commit ba11769

Please sign in to comment.