optimize pledge sector

This commit is contained in:
zgfzgf 2020-11-08 16:24:50 +08:00
parent f225b7b928
commit 3665f90795

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