Get current seal proof when necessary

This commit is contained in:
yaohcn 2021-05-27 11:53:33 +08:00
parent 3cdd06b719
commit d04e7d98ce

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