genesis: Change template types

This commit is contained in:
Łukasz Magiera 2020-02-12 01:58:55 +01:00
parent 0279e8a34a
commit bcea739cff
2 changed files with 11 additions and 6 deletions

View File

@ -3,6 +3,7 @@ package sealing
import (
"context"
commcid "github.com/filecoin-project/go-fil-commcid"
"github.com/filecoin-project/go-sectorbuilder/fs"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/builtin/miner"
@ -97,11 +98,15 @@ func (m *Sealing) handlePreCommitting(ctx statemachine.Context, sector SectorInf
}
params := &miner.PreCommitSectorParams{
SectorNumber: sector.SectorID,
Info: miner.SectorPreCommitInfo{
Expiration: 0,
SectorNumber: sector.SectorID,
SealedCID: commcid.ReplicaCommitmentV1ToCID(sector.CommR),
SealEpoch: sector.Ticket.BlockHeight,
DealIDs: nil, // sector.deals(), // TODO: REFACTOR
},
CommR: sector.CommR,
SealEpoch: sector.Ticket.BlockHeight,
DealIDs: nil, // sector.deals(), // TODO: REFACTOR
}
enc, aerr := actors.SerializeParams(params)
if aerr != nil {

View File

@ -8,12 +8,12 @@ import (
)
type SealTicket struct {
BlockHeight uint64
BlockHeight abi.ChainEpoch
TicketBytes []byte
}
func (t *SealTicket) SB() sectorbuilder.SealTicket {
out := sectorbuilder.SealTicket{BlockHeight: t.BlockHeight}
out := sectorbuilder.SealTicket{BlockHeight: uint64(t.BlockHeight)}
copy(out.TicketBytes[:], t.TicketBytes)
return out
}