use specs-actors birfields

This commit is contained in:
Łukasz Magiera 2020-02-14 01:24:24 +01:00
parent 8a5a5022ce
commit 944ba527f3

View File

@ -98,16 +98,14 @@ func (m *Sealing) handlePreCommitting(ctx statemachine.Context, sector SectorInf
} }
} }
params := &miner.PreCommitSectorParams{ params := &miner.SectorPreCommitInfo{
Info: miner.SectorPreCommitInfo{
Expiration: 0, Expiration: 0,
SectorNumber: sector.SectorID, SectorNumber: sector.SectorID,
SealedCID: commcid.ReplicaCommitmentV1ToCID(sector.CommR), SealedCID: commcid.ReplicaCommitmentV1ToCID(sector.CommR),
SealEpoch: sector.Ticket.BlockHeight, SealEpoch: sector.Ticket.BlockHeight,
DealIDs: nil, // sector.deals(), // TODO: REFACTOR DealIDs: nil, // sector.deals(), // TODO: REFACTOR
}, }
}
enc, aerr := actors.SerializeParams(params) enc, aerr := actors.SerializeParams(params)
if aerr != nil { if aerr != nil {
return ctx.Send(SectorPreCommitFailed{xerrors.Errorf("could not serialize commit sector parameters: %w", aerr)}) return ctx.Send(SectorPreCommitFailed{xerrors.Errorf("could not serialize commit sector parameters: %w", aerr)})
@ -259,11 +257,11 @@ func (m *Sealing) handleFaulty(ctx statemachine.Context, sector SectorInfo) erro
// TODO: check if the fault has already been reported, and that this sector is even valid // TODO: check if the fault has already been reported, and that this sector is even valid
// TODO: coalesce faulty sector reporting // TODO: coalesce faulty sector reporting
/*bf := types.NewBitField() bf := abi.NewBitField()
bf.Set(uint64(sector.SectorID))*/ bf.Set(uint64(sector.SectorID))
enc, aerr := actors.SerializeParams(&miner.DeclareTemporaryFaultsParams{ enc, aerr := actors.SerializeParams(&miner.DeclareTemporaryFaultsParams{
SectorNumbers: []abi.SectorNumber{sector.SectorID}, SectorNumbers: bf,
Duration: 99999999, // TODO: This is very unlikely to be the correct number Duration: 99999999, // TODO: This is very unlikely to be the correct number
}) })
if aerr != nil { if aerr != nil {