cleaning up a few types

This commit is contained in:
whyrusleeping 2019-09-17 20:32:52 -07:00
parent f2f60c029b
commit 3e45088812
3 changed files with 7 additions and 4 deletions

View File

@ -17,6 +17,8 @@ type SectorSealingStatus = sectorbuilder.SectorSealingStatus
type StagedSectorMetadata = sectorbuilder.StagedSectorMetadata
type SortedSectorInfo = sectorbuilder.SortedSectorInfo
const CommLen = sectorbuilder.CommitmentBytesLen
type SectorBuilder struct {
@ -81,7 +83,7 @@ func (sb *SectorBuilder) GetAllStagedSectors() ([]StagedSectorMetadata, error) {
return sectorbuilder.GetAllStagedSectors(sb.handle)
}
func (sb *SectorBuilder) GeneratePoSt(sectorInfo sectorbuilder.SortedSectorInfo, challengeSeed [CommLen]byte, faults []uint64) ([]byte, error) {
func (sb *SectorBuilder) GeneratePoSt(sectorInfo SortedSectorInfo, challengeSeed [CommLen]byte, faults []uint64) ([]byte, error) {
// Wait, this is a blocking method with no way of interrupting it?
// does it checkpoint itself?
return sectorbuilder.GeneratePoSt(sb.handle, sectorInfo, challengeSeed, faults)

View File

@ -265,7 +265,8 @@ func (m *Miner) maybeDoPost(ctx context.Context, ts *types.TipSet) (<-chan error
ret := make(chan error, 1)
go func() {
proof, err := m.secst.RunPoSt(ctx, sset, r)
var faults []uint64
proof, err := m.secst.RunPoSt(ctx, sset, r, faults)
if err != nil {
ret <- xerrors.Errorf("running post failed: %w", err)
return

View File

@ -163,8 +163,8 @@ func (s *Store) WaitSeal(ctx context.Context, sector uint64) (sectorbuilder.Sect
return s.sb.SealStatus(sector)
}
func (s *Store) RunPoSt(ctx context.Context, sectors []*api.SectorInfo, r []byte) ([]byte, error) {
panic("NYI")
func (s *Store) RunPoSt(ctx context.Context, sectors []*api.SectorInfo, r []byte, faults []uint64) ([]byte, error) {
panic("TODO")
}
func (s *Store) Stop() {