Merge pull request #7245 from filecoin-project/fix/commagg-loop
sealing: Fix retry loop in SubmitCommitAggregate
This commit is contained in:
commit
5831a6ba4a
2
extern/storage-sealing/fsm.go
vendored
2
extern/storage-sealing/fsm.go
vendored
@ -113,7 +113,7 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto
|
||||
on(SectorCommitFailed{}, CommitFailed),
|
||||
),
|
||||
SubmitCommitAggregate: planOne(
|
||||
on(SectorCommitAggregateSent{}, CommitWait),
|
||||
on(SectorCommitAggregateSent{}, CommitAggregateWait),
|
||||
on(SectorCommitFailed{}, CommitFailed),
|
||||
on(SectorRetrySubmitCommit{}, SubmitCommit),
|
||||
),
|
||||
|
4
extern/storage-sealing/fsm_test.go
vendored
4
extern/storage-sealing/fsm_test.go
vendored
@ -135,7 +135,7 @@ func TestHappyPathFinalizeEarly(t *testing.T) {
|
||||
require.Equal(m.t, m.state.State, SubmitCommitAggregate)
|
||||
|
||||
m.planSingle(SectorCommitAggregateSent{})
|
||||
require.Equal(m.t, m.state.State, CommitWait)
|
||||
require.Equal(m.t, m.state.State, CommitAggregateWait)
|
||||
|
||||
m.planSingle(SectorProving{})
|
||||
require.Equal(m.t, m.state.State, FinalizeSector)
|
||||
@ -143,7 +143,7 @@ func TestHappyPathFinalizeEarly(t *testing.T) {
|
||||
m.planSingle(SectorFinalized{})
|
||||
require.Equal(m.t, m.state.State, Proving)
|
||||
|
||||
expected := []SectorState{Packing, GetTicket, PreCommit1, PreCommit2, PreCommitting, PreCommitWait, WaitSeed, Committing, CommitFinalize, SubmitCommit, SubmitCommitAggregate, CommitWait, FinalizeSector, Proving}
|
||||
expected := []SectorState{Packing, GetTicket, PreCommit1, PreCommit2, PreCommitting, PreCommitWait, WaitSeed, Committing, CommitFinalize, SubmitCommit, SubmitCommitAggregate, CommitAggregateWait, FinalizeSector, Proving}
|
||||
for i, n := range notif {
|
||||
if n.before.State != expected[i] {
|
||||
t.Fatalf("expected before state: %s, got: %s", expected[i], n.before.State)
|
||||
|
5
extern/storage-sealing/states_sealing.go
vendored
5
extern/storage-sealing/states_sealing.go
vendored
@ -710,11 +710,8 @@ func (m *Sealing) handleSubmitCommitAggregate(ctx statemachine.Context, sector S
|
||||
Proof: sector.Proof, // todo: this correct??
|
||||
Spt: sector.SectorType,
|
||||
})
|
||||
if err != nil {
|
||||
return ctx.Send(SectorRetrySubmitCommit{})
|
||||
}
|
||||
|
||||
if res.Error != "" {
|
||||
if err != nil || res.Error != "" {
|
||||
tok, _, err := m.Api.ChainHead(ctx.Context())
|
||||
if err != nil {
|
||||
log.Errorf("handleSubmitCommit: api error, not proceeding: %+v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user