Merge pull request #6339 from yaohcn/get-sp

Get current seal proof when necessary
This commit is contained in:
Łukasz Magiera 2021-05-27 11:14:13 +02:00 committed by GitHub
commit 6267832504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()