v1.27.0-a #10
@ -11,6 +11,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
@ -109,6 +110,27 @@ func SectorsStatusCmd(getActorAddress ActorAddressGetter, getOnDiskInfo OnDiskIn
|
|||||||
fmt.Printf("OnTime:\t\t%v\n", status.OnTime)
|
fmt.Printf("OnTime:\t\t%v\n", status.OnTime)
|
||||||
fmt.Printf("Early:\t\t%v\n", status.Early)
|
fmt.Printf("Early:\t\t%v\n", status.Early)
|
||||||
|
|
||||||
|
var pamsHeaderOnce sync.Once
|
||||||
|
|
||||||
|
for pi, piece := range status.Pieces {
|
||||||
|
if piece.DealInfo == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if piece.DealInfo.PieceActivationManifest == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
pamsHeaderOnce.Do(func() {
|
||||||
|
fmt.Printf("\nPiece Activation Manifests\n")
|
||||||
|
})
|
||||||
|
|
||||||
|
pam := piece.DealInfo.PieceActivationManifest
|
||||||
|
|
||||||
|
fmt.Printf("Piece %d: %s %s verif-alloc:%+v\n", pi, pam.CID, types.SizeStr(types.NewInt(uint64(pam.Size))), pam.VerifiedAllocationKey)
|
||||||
|
for ni, notification := range pam.Notify {
|
||||||
|
fmt.Printf("\tNotify %d: %s (%x)\n", ni, notification.Address, notification.Payload)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
onChainInfo = true
|
onChainInfo = true
|
||||||
}
|
}
|
||||||
|
@ -310,6 +310,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
|
exp := st.Expiration
|
||||||
if st.OnTime > 0 && st.OnTime < exp {
|
if st.OnTime > 0 && st.OnTime < exp {
|
||||||
exp = st.OnTime // Can be different when the sector was CC upgraded
|
exp = st.OnTime // Can be different when the sector was CC upgraded
|
||||||
@ -324,6 +331,8 @@ var sectorsListCmd = &cli.Command{
|
|||||||
|
|
||||||
if deals > 0 {
|
if deals > 0 {
|
||||||
m["Deals"] = color.GreenString("%d", deals)
|
m["Deals"] = color.GreenString("%d", deals)
|
||||||
|
} else if pams > 0 {
|
||||||
|
m["Deals"] = color.MagentaString("DDO:%d", pams)
|
||||||
} else {
|
} else {
|
||||||
m["Deals"] = color.BlueString("CC")
|
m["Deals"] = color.BlueString("CC")
|
||||||
if st.ToUpgrade {
|
if st.ToUpgrade {
|
||||||
|
Loading…
Reference in New Issue
Block a user