v1.27.0-a #10
@ -952,20 +952,30 @@ func (m *Sealing) SectorsStatus(ctx context.Context, sid abi.SectorNumber, showO
|
|||||||
return api.SectorInfo{}, err
|
return api.SectorInfo{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nv, err := m.Api.StateNetworkVersion(ctx, types.EmptyTSK)
|
||||||
|
if err != nil {
|
||||||
|
return api.SectorInfo{}, xerrors.Errorf("getting network version: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
deals := make([]abi.DealID, len(info.Pieces))
|
deals := make([]abi.DealID, len(info.Pieces))
|
||||||
pieces := make([]api.SectorPiece, len(info.Pieces))
|
pieces := make([]api.SectorPiece, len(info.Pieces))
|
||||||
for i, piece := range info.Pieces {
|
for i, piece := range info.Pieces {
|
||||||
// todo make this work with DDO deals in some reasonable way
|
|
||||||
|
|
||||||
pieces[i].Piece = piece.Piece()
|
pieces[i].Piece = piece.Piece()
|
||||||
if !piece.HasDealInfo() || piece.Impl().PublishCid == nil {
|
|
||||||
|
if !piece.HasDealInfo() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
pdi := piece.Impl()
|
||||||
|
if pdi.Valid(nv) != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
pdi := piece.DealInfo().Impl() // copy
|
|
||||||
pieces[i].DealInfo = &pdi
|
pieces[i].DealInfo = &pdi
|
||||||
|
|
||||||
deals[i] = piece.DealInfo().Impl().DealID
|
if pdi.PublishCid != nil {
|
||||||
|
deals[i] = pdi.DealID
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log := make([]api.SectorLog, len(info.Log))
|
log := make([]api.SectorLog, len(info.Log))
|
||||||
|
Loading…
Reference in New Issue
Block a user