sbmock

package
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2020 License: Apache-2.0, MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockVerifier = mockVerif{}

Functions

func AddOpFinish

func AddOpFinish(ctx context.Context) (context.Context, func())

func PreSeal

func PreSeal(ssize uint64, maddr address.Address, sectors int) (*genesis.GenesisMiner, error)

Types

type SBMock

type SBMock struct {
	// contains filtered or unexported fields
}

func NewMockSectorBuilder

func NewMockSectorBuilder(threads int, ssize uint64) *SBMock

func (*SBMock) AcquireSectorId

func (sb *SBMock) AcquireSectorId() (uint64, error)

func (*SBMock) AddPiece

func (sb *SBMock) AddPiece(ctx context.Context, size uint64, sectorId uint64, r io.Reader, existingPieces []uint64) (sectorbuilder.PublicPieceInfo, error)

func (*SBMock) AddWorker

func (sb *SBMock) AddWorker(context.Context, sectorbuilder.WorkerCfg) (<-chan sectorbuilder.WorkerTask, error)

func (*SBMock) AllocSectorPath added in v0.2.8

func (sb *SBMock) AllocSectorPath(typ fs.DataType, sectorID uint64, cache bool) (fs.SectorPath, error)

func (*SBMock) CanCommit added in v0.2.6

func (sb *SBMock) CanCommit(sectorID uint64) (bool, error)

func (*SBMock) ComputeElectionPoSt

func (sb *SBMock) ComputeElectionPoSt(sectorInfo sectorbuilder.SortedPublicSectorInfo, challengeSeed []byte, winners []sectorbuilder.EPostCandidate) ([]byte, error)

func (*SBMock) DropStaged added in v0.2.8

func (sb *SBMock) DropStaged(context.Context, uint64) error

func (*SBMock) FailSector

func (sb *SBMock) FailSector(sid uint64) error

func (*SBMock) FinalizeSector added in v0.2.8

func (sb *SBMock) FinalizeSector(context.Context, uint64) error

func (*SBMock) GenerateEPostCandidates

func (sb *SBMock) GenerateEPostCandidates(sectorInfo sectorbuilder.SortedPublicSectorInfo, challengeSeed [sectorbuilder.CommLen]byte, faults []uint64) ([]sectorbuilder.EPostCandidate, error)

func (*SBMock) GenerateFallbackPoSt

func (sb *SBMock) GenerateFallbackPoSt(sectorbuilder.SortedPublicSectorInfo, [sectorbuilder.CommLen]byte, []uint64) ([]sectorbuilder.EPostCandidate, []byte, error)

func (*SBMock) GetPath

func (sb *SBMock) GetPath(string, string) (string, error)

func (*SBMock) RateLimit

func (sb *SBMock) RateLimit() func()

func (*SBMock) ReadPieceFromSealedSector

func (sb *SBMock) ReadPieceFromSealedSector(ctx context.Context, sectorID uint64, offset uint64, size uint64, ticket []byte, commD []byte) (io.ReadCloser, error)

func (*SBMock) ReleaseSector added in v0.2.8

func (sb *SBMock) ReleaseSector(fs.DataType, fs.SectorPath)

func (*SBMock) Scrub

func (sb *SBMock) Scrub(sectorbuilder.SortedPublicSectorInfo) []*sectorbuilder.Fault

func (*SBMock) SealCommit

func (sb *SBMock) SealCommit(ctx context.Context, sid uint64, ticket sectorbuilder.SealTicket, seed sectorbuilder.SealSeed, pieces []sectorbuilder.PublicPieceInfo, precommit sectorbuilder.RawSealPreCommitOutput) ([]byte, error)

func (*SBMock) SealPreCommit

func (sb *SBMock) SealPreCommit(ctx context.Context, sid uint64, ticket sectorbuilder.SealTicket, pieces []sectorbuilder.PublicPieceInfo) (sectorbuilder.RawSealPreCommitOutput, error)

func (*SBMock) SectorPath added in v0.2.8

func (sb *SBMock) SectorPath(typ fs.DataType, sectorID uint64) (fs.SectorPath, error)

func (*SBMock) SectorSize

func (sb *SBMock) SectorSize() uint64

func (*SBMock) StageFakeData

func (sb *SBMock) StageFakeData() (uint64, []sectorbuilder.PublicPieceInfo, error)

func (*SBMock) TaskDone

func (sb *SBMock) TaskDone(context.Context, uint64, sectorbuilder.SealRes) error

func (*SBMock) WorkerStats

func (sb *SBMock) WorkerStats() sectorbuilder.WorkerStats

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL