Merge pull request #5166 from liyue201/patch-1

fix curSealing out of MaxSealingSectors limit
This commit is contained in:
Łukasz Magiera 2020-12-10 19:18:30 +01:00 committed by GitHub
commit 46c7f047d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ func (m *Sealing) PledgeSector() error {
}
if cfg.MaxSealingSectors > 0 {
if m.stats.curSealing() > cfg.MaxSealingSectors {
if m.stats.curSealing() >= cfg.MaxSealingSectors {
return xerrors.Errorf("too many sectors sealing (curSealing: %d, max: %d)", m.stats.curSealing(), cfg.MaxSealingSectors)
}
}