Merge pull request #7336 from filecoin-project/fix/dealcheck-panic
fix a panic in HandleRecoverDealIDs
This commit is contained in:
commit
45dc9697bf
5
extern/storage-sealing/states_failed.go
vendored
5
extern/storage-sealing/states_failed.go
vendored
@ -394,6 +394,11 @@ func (m *Sealing) HandleRecoverDealIDs(ctx Context, sector SectorInfo) error {
|
||||
failed[i] = xerrors.Errorf("getting current deal info for piece %d: %w", i, err)
|
||||
}
|
||||
|
||||
if res.MarketDeal == nil {
|
||||
failed[i] = xerrors.Errorf("nil market deal (%d,%d,%d,%s)", i, sector.SectorNumber, p.DealInfo.DealID, p.Piece.PieceCID)
|
||||
continue
|
||||
}
|
||||
|
||||
if res.MarketDeal.Proposal.PieceCID != p.Piece.PieceCID {
|
||||
failed[i] = xerrors.Errorf("recovered piece (%d) deal in sector %d (dealid %d) has different PieceCID %s != %s", i, sector.SectorNumber, p.DealInfo.DealID, p.Piece.PieceCID, res.MarketDeal.Proposal.PieceCID)
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user