Merge pull request #4765 from zgfzgf/feat-sealing-garbage

optimize pledge sector
This commit is contained in:
Łukasz Magiera 2020-11-09 21:06:33 +01:00 committed by GitHub
commit 95d9084899
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,13 +54,14 @@ func (m *Sealing) PledgeSector() error {
log.Errorf("%+v", err)
return
}
err = m.sealer.NewSector(ctx, m.minerSector(sid))
sectorID := m.minerSector(sid)
err = m.sealer.NewSector(ctx, sectorID)
if err != nil {
log.Errorf("%+v", err)
return
}
pieces, err := m.pledgeSector(ctx, m.minerSector(sid), []abi.UnpaddedPieceSize{}, size)
pieces, err := m.pledgeSector(ctx, sectorID, []abi.UnpaddedPieceSize{}, size)
if err != nil {
log.Errorf("%+v", err)
return