Skip to content

Commit

Permalink
Get current seal proof when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
yaohcn committed May 27, 2021
1 parent 3cdd06b commit d04e7d9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions extern/storage-sealing/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,16 @@ func (m *Sealing) onUpdateSector(ctx context.Context, state *SectorInfo) error {
if err != nil {
return xerrors.Errorf("getting config: %w", err)
}
sp, err := m.currentSealProof(ctx)
if err != nil {
return xerrors.Errorf("getting seal proof type: %w", err)
}

shouldUpdateInput := m.stats.updateSector(cfg, m.minerSectorID(state.SectorNumber), state.State)

// trigger more input processing when we've dipped below max sealing limits
if shouldUpdateInput {
sp, err := m.currentSealProof(ctx)
if err != nil {
return xerrors.Errorf("getting seal proof type: %w", err)
}

go func() {
m.inputLk.Lock()
defer m.inputLk.Unlock()
Expand Down

0 comments on commit d04e7d9

Please sign in to comment.