Fix WaitDeals sector accounting
This commit is contained in:
parent
7111e924cc
commit
6907e5879d
4
extern/storage-sealing/input.go
vendored
4
extern/storage-sealing/input.go
vendored
@ -382,11 +382,11 @@ func (m *Sealing) tryCreateDealSector(ctx context.Context, sp abi.RegisteredSeal
|
||||
return xerrors.Errorf("getting storage config: %w", err)
|
||||
}
|
||||
|
||||
if cfg.MaxSealingSectorsForDeals > 0 && m.stats.curSealing() > cfg.MaxSealingSectorsForDeals {
|
||||
if cfg.MaxSealingSectorsForDeals > 0 && m.stats.curSealing() >= cfg.MaxSealingSectorsForDeals {
|
||||
return nil
|
||||
}
|
||||
|
||||
if cfg.MaxWaitDealsSectors > 0 && m.stats.curStaging() > cfg.MaxWaitDealsSectors {
|
||||
if cfg.MaxWaitDealsSectors > 0 && m.stats.curStaging() >= cfg.MaxWaitDealsSectors {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
2
extern/storage-sealing/sector_state.go
vendored
2
extern/storage-sealing/sector_state.go
vendored
@ -89,7 +89,7 @@ const (
|
||||
|
||||
func toStatState(st SectorState) statSectorState {
|
||||
switch st {
|
||||
case Empty, WaitDeals, AddPiece:
|
||||
case UndefinedSectorState, Empty, WaitDeals, AddPiece:
|
||||
return sstStaging
|
||||
case Packing, GetTicket, PreCommit1, PreCommit2, PreCommitting, PreCommitWait, WaitSeed, Committing, SubmitCommit, CommitWait, FinalizeSector:
|
||||
return sstSealing
|
||||
|
Loading…
Reference in New Issue
Block a user