storagefsm: Handle PC2 with missing replica
This commit is contained in:
parent
54fdd6ba5a
commit
a783bf9b8b
1
extern/storage-sealing/fsm.go
vendored
1
extern/storage-sealing/fsm.go
vendored
@ -57,6 +57,7 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto
|
|||||||
PreCommit2: planOne(
|
PreCommit2: planOne(
|
||||||
on(SectorPreCommit2{}, PreCommitting),
|
on(SectorPreCommit2{}, PreCommitting),
|
||||||
on(SectorSealPreCommit2Failed{}, SealPreCommit2Failed),
|
on(SectorSealPreCommit2Failed{}, SealPreCommit2Failed),
|
||||||
|
on(SectorSealPreCommit1Failed{}, SealPreCommit1Failed),
|
||||||
),
|
),
|
||||||
PreCommitting: planOne(
|
PreCommitting: planOne(
|
||||||
on(SectorSealPreCommit1Failed{}, SealPreCommit1Failed),
|
on(SectorSealPreCommit1Failed{}, SealPreCommit1Failed),
|
||||||
|
5
extern/storage-sealing/states_sealing.go
vendored
5
extern/storage-sealing/states_sealing.go
vendored
@ -3,6 +3,7 @@ package sealing
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/build"
|
"github.com/filecoin-project/lotus/build"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
|
||||||
@ -138,6 +139,10 @@ func (m *Sealing) handlePreCommit2(ctx statemachine.Context, sector SectorInfo)
|
|||||||
return ctx.Send(SectorSealPreCommit2Failed{xerrors.Errorf("seal pre commit(2) failed: %w", err)})
|
return ctx.Send(SectorSealPreCommit2Failed{xerrors.Errorf("seal pre commit(2) failed: %w", err)})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cids.Unsealed == cid.Undef {
|
||||||
|
return ctx.Send(SectorSealPreCommit1Failed{xerrors.Errorf("seal pre commit(2) returned undefined CommD")})
|
||||||
|
}
|
||||||
|
|
||||||
return ctx.Send(SectorPreCommit2{
|
return ctx.Send(SectorPreCommit2{
|
||||||
Unsealed: cids.Unsealed,
|
Unsealed: cids.Unsealed,
|
||||||
Sealed: cids.Sealed,
|
Sealed: cids.Sealed,
|
||||||
|
Loading…
Reference in New Issue
Block a user