genesis: Change template types
This commit is contained in:
parent
0279e8a34a
commit
bcea739cff
13
states.go
13
states.go
@ -3,6 +3,7 @@ package sealing
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
commcid "github.com/filecoin-project/go-fil-commcid"
|
||||||
"github.com/filecoin-project/go-sectorbuilder/fs"
|
"github.com/filecoin-project/go-sectorbuilder/fs"
|
||||||
"github.com/filecoin-project/specs-actors/actors/abi"
|
"github.com/filecoin-project/specs-actors/actors/abi"
|
||||||
"github.com/filecoin-project/specs-actors/actors/builtin/miner"
|
"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{
|
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)
|
enc, aerr := actors.SerializeParams(params)
|
||||||
if aerr != nil {
|
if aerr != nil {
|
||||||
|
4
types.go
4
types.go
@ -8,12 +8,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type SealTicket struct {
|
type SealTicket struct {
|
||||||
BlockHeight uint64
|
BlockHeight abi.ChainEpoch
|
||||||
TicketBytes []byte
|
TicketBytes []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *SealTicket) SB() sectorbuilder.SealTicket {
|
func (t *SealTicket) SB() sectorbuilder.SealTicket {
|
||||||
out := sectorbuilder.SealTicket{BlockHeight: t.BlockHeight}
|
out := sectorbuilder.SealTicket{BlockHeight: uint64(t.BlockHeight)}
|
||||||
copy(out.TicketBytes[:], t.TicketBytes)
|
copy(out.TicketBytes[:], t.TicketBytes)
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user