Fix compilation after dep updates
This commit is contained in:
@@ -107,13 +107,13 @@ func (s *FPoStScheduler) checkFaults(ctx context.Context, ssi sectorbuilder.Sort
|
||||
params := &actors.DeclareFaultsParams{Faults: types.NewBitField()}
|
||||
|
||||
for _, fault := range faults {
|
||||
if _, ok := declaredFaults[abi.SectorNumber(fault.SectorID)]; ok {
|
||||
if _, ok := declaredFaults[abi.SectorNumber(fault.SectorNum)]; ok {
|
||||
continue
|
||||
}
|
||||
|
||||
log.Warnf("new fault detected: sector %d: %s", fault.SectorID, fault.Err)
|
||||
declaredFaults[abi.SectorNumber(fault.SectorID)] = struct{}{}
|
||||
params.Faults.Set(fault.SectorID)
|
||||
log.Warnf("new fault detected: sector %d: %s", fault.SectorNum, fault.Err)
|
||||
declaredFaults[fault.SectorNum] = struct{}{}
|
||||
params.Faults.Set(uint64(fault.SectorNum))
|
||||
}
|
||||
|
||||
pc, err := params.Faults.Count()
|
||||
@@ -184,7 +184,7 @@ func (s *FPoStScheduler) runPost(ctx context.Context, eps abi.ChainEpoch, ts *ty
|
||||
copy(part, sc.PartialTicket[:])
|
||||
candidates[i] = types.EPostTicket{
|
||||
Partial: part,
|
||||
SectorID: sc.SectorID,
|
||||
SectorID: sc.SectorNum,
|
||||
ChallengeIndex: sc.SectorChallengeIndex,
|
||||
}
|
||||
}
|
||||
@@ -210,8 +210,8 @@ func (s *FPoStScheduler) sortedSectorInfo(ctx context.Context, ts *types.TipSet)
|
||||
copy(commR[:], sector.CommR)
|
||||
|
||||
sbsi[k] = ffi.PublicSectorInfo{
|
||||
SectorID: uint64(sector.SectorID),
|
||||
CommR: commR,
|
||||
SectorNum: sector.SectorID,
|
||||
CommR: commR,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
// TODO: refactor this to be direct somehow
|
||||
|
||||
func (m *Miner) AllocatePiece(size uint64) (sectorID abi.SectorNumber, offset uint64, err error) {
|
||||
func (m *Miner) AllocatePiece(size abi.UnpaddedPieceSize) (sectorID abi.SectorNumber, offset uint64, err error) {
|
||||
return m.sealing.AllocatePiece(size)
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ func (m *Sealing) PledgeSector() error {
|
||||
|
||||
size := abi.PaddedPieceSize(m.sb.SectorSize()).Unpadded()
|
||||
|
||||
sid, err := m.sb.AcquireSectorId()
|
||||
sid, err := m.sb.AcquireSectorNumber()
|
||||
if err != nil {
|
||||
log.Errorf("%+v", err)
|
||||
return
|
||||
|
||||
@@ -12,13 +12,13 @@ import (
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/filecoin-project/go-padreader"
|
||||
"github.com/filecoin-project/go-sectorbuilder"
|
||||
|
||||
"github.com/filecoin-project/lotus/api"
|
||||
"github.com/filecoin-project/lotus/chain/events"
|
||||
"github.com/filecoin-project/lotus/chain/store"
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/filecoin-project/lotus/lib/padreader"
|
||||
"github.com/filecoin-project/lotus/lib/statemachine"
|
||||
)
|
||||
|
||||
@@ -96,12 +96,12 @@ func (m *Sealing) Stop(ctx context.Context) error {
|
||||
return m.sectors.Stop(ctx)
|
||||
}
|
||||
|
||||
func (m *Sealing) AllocatePiece(size uint64) (sectorID abi.SectorNumber, offset uint64, err error) {
|
||||
if padreader.PaddedSize(size) != size {
|
||||
func (m *Sealing) AllocatePiece(size abi.UnpaddedPieceSize) (sectorID abi.SectorNumber, offset uint64, err error) {
|
||||
if (padreader.PaddedSize(uint64(size))) != size {
|
||||
return 0, 0, xerrors.Errorf("cannot allocate unpadded piece")
|
||||
}
|
||||
|
||||
sid, err := m.sb.AcquireSectorId() // TODO: Put more than one thing in a sector
|
||||
sid, err := m.sb.AcquireSectorNumber() // TODO: Put more than one thing in a sector
|
||||
if err != nil {
|
||||
return 0, 0, xerrors.Errorf("acquiring sector ID: %w", err)
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ type Piece struct {
|
||||
}
|
||||
|
||||
func (p *Piece) ppi() (out sectorbuilder.PublicPieceInfo) {
|
||||
out.Size = uint64(p.Size)
|
||||
out.Size = p.Size
|
||||
copy(out.CommP[:], p.CommP)
|
||||
return out
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func (m *Sealing) fastPledgeCommitment(size abi.UnpaddedPieceSize, parts uint64)
|
||||
err = multierror.Append(err, perr)
|
||||
}
|
||||
out[i] = sectorbuilder.PublicPieceInfo{
|
||||
Size: uint64(piece),
|
||||
Size: piece,
|
||||
CommP: commP,
|
||||
}
|
||||
lk.Unlock()
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"io"
|
||||
"sync"
|
||||
|
||||
"github.com/filecoin-project/go-padreader"
|
||||
sectorbuilder "github.com/filecoin-project/go-sectorbuilder"
|
||||
"github.com/filecoin-project/specs-actors/actors/abi"
|
||||
"github.com/ipfs/go-datastore"
|
||||
@@ -17,8 +18,8 @@ import (
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
cborutil "github.com/filecoin-project/go-cbor-util"
|
||||
|
||||
"github.com/filecoin-project/lotus/api"
|
||||
"github.com/filecoin-project/lotus/lib/padreader"
|
||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||
"github.com/filecoin-project/lotus/storage"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user