From d16c5d0e93947921be09e5c4d5f302855a4bfeda Mon Sep 17 00:00:00 2001 From: zenground0 Date: Mon, 10 Jan 2022 15:47:20 +0530 Subject: [PATCH] Fix hande deal recover return value bug --- extern/storage-sealing/states_failed.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extern/storage-sealing/states_failed.go b/extern/storage-sealing/states_failed.go index a93cda3f5..0d7c08ce5 100644 --- a/extern/storage-sealing/states_failed.go +++ b/extern/storage-sealing/states_failed.go @@ -423,7 +423,7 @@ func (m *Sealing) handleRecoverDealIDsOrFailWith(ctx statemachine.Context, secto // TODO: check if we are in an early enough state try to remove this piece log.Errorf("can't fix sector deals: piece %d (of %d) of sector %d has nil DealInfo.PublishCid (refers to deal %d)", i, len(sector.Pieces), sector.SectorNumber, p.DealInfo.DealID) // Not much to do here (and this can only happen for old spacerace sectors) - return ctx.Send(SectorRemove{}) + return ctx.Send(failWith) } var dp *market.DealProposal @@ -458,7 +458,7 @@ func (m *Sealing) handleRecoverDealIDsOrFailWith(ctx statemachine.Context, secto if len(failed)+paddingPieces == len(sector.Pieces) { log.Errorf("removing sector %d: all deals expired or unrecoverable: %+v", sector.SectorNumber, merr) - return ctx.Send(SectorRemove{}) + return ctx.Send(failWith) } // todo: try to remove bad pieces (hard; see the todo above) @@ -466,7 +466,7 @@ func (m *Sealing) handleRecoverDealIDsOrFailWith(ctx statemachine.Context, secto // for now removing sectors is probably better than having them stuck in RecoverDealIDs // and expire anyways log.Errorf("removing sector %d: deals expired or unrecoverable: %+v", sector.SectorNumber, merr) - return ctx.Send(SectorRemove{}) + return ctx.Send(failWith) } // Not much to do here, we can't go back in time to commit this sector