Skip to content

Commit

Permalink
Merge pull request #6339 from yaohcn/get-sp
Browse files Browse the repository at this point in the history
Get current seal proof when necessary
  • Loading branch information
magik6k authored May 27, 2021
2 parents 83976cf + d04e7d9 commit 6267832
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 6267832

Please sign in to comment.