mock

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0, MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockProver = MockVerifier
View Source
var MockVerifier = mockVerifProver{
	// contains filtered or unexported fields
}

Functions

func AddOpFinish

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

func CommDR

func CommDR(in []byte) (out [32]byte)

Types

type SectorMgr

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

func NewMockSectorMgr

func NewMockSectorMgr(genesisSectors []abi.SectorID) *SectorMgr

func (*SectorMgr) AcquireSectorNumber

func (mgr *SectorMgr) AcquireSectorNumber() (abi.SectorNumber, error)

func (*SectorMgr) AddPiece

func (mgr *SectorMgr) AddPiece(ctx context.Context, sectorID storage.SectorRef, existingPieces []abi.UnpaddedPieceSize, size abi.UnpaddedPieceSize, r io.Reader) (abi.PieceInfo, error)

func (*SectorMgr) CheckProvable

func (mgr *SectorMgr) CheckProvable(ctx context.Context, pp abi.RegisteredPoStProof, ids []storage.SectorRef, rg storiface.RGetter) (map[abi.SectorID]string, error)

func (*SectorMgr) Fail added in v1.8.0

func (mgr *SectorMgr) Fail()

func (*SectorMgr) FinalizeSector

func (mgr *SectorMgr) FinalizeSector(context.Context, storage.SectorRef, []storage.Range) error

func (*SectorMgr) ForceState added in v1.1.3

func (mgr *SectorMgr) ForceState(sid storage.SectorRef, st int) error

func (*SectorMgr) GenerateWindowPoSt

func (mgr *SectorMgr) GenerateWindowPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof5.SectorInfo, randomness abi.PoStRandomness) ([]proof5.PoStProof, []abi.SectorID, error)

func (*SectorMgr) GenerateWinningPoSt

func (mgr *SectorMgr) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof5.SectorInfo, randomness abi.PoStRandomness) ([]proof5.PoStProof, error)

func (*SectorMgr) IsUnsealed added in v1.11.0

func (mgr *SectorMgr) IsUnsealed(ctx context.Context, sector storage.SectorRef, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize) (bool, error)

func (*SectorMgr) MarkCorrupted added in v0.7.1

func (mgr *SectorMgr) MarkCorrupted(sid storage.SectorRef, corrupted bool) error

func (*SectorMgr) MarkFailed

func (mgr *SectorMgr) MarkFailed(sid storage.SectorRef, failed bool) error

func (*SectorMgr) NewSector

func (mgr *SectorMgr) NewSector(ctx context.Context, sector storage.SectorRef) error

func (*SectorMgr) ReadPiece

func (mgr *SectorMgr) ReadPiece(ctx context.Context, sector storage.SectorRef, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize, ticket abi.SealRandomness, unsealed cid.Cid) (io.ReadCloser, bool, error)

func (*SectorMgr) ReleaseUnsealed

func (mgr *SectorMgr) ReleaseUnsealed(ctx context.Context, sector storage.SectorRef, safeToFree []storage.Range) error

func (*SectorMgr) Remove

func (mgr *SectorMgr) Remove(ctx context.Context, sector storage.SectorRef) error

func (*SectorMgr) ReturnAddPiece added in v1.1.3

func (mgr *SectorMgr) ReturnAddPiece(ctx context.Context, callID storiface.CallID, pi abi.PieceInfo, err *storiface.CallError) error

func (*SectorMgr) ReturnFetch added in v1.1.3

func (mgr *SectorMgr) ReturnFetch(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error

func (*SectorMgr) ReturnFinalizeSector added in v1.1.3

func (mgr *SectorMgr) ReturnFinalizeSector(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error

func (*SectorMgr) ReturnMoveStorage added in v1.1.3

func (mgr *SectorMgr) ReturnMoveStorage(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error

func (*SectorMgr) ReturnReadPiece added in v1.1.3

func (mgr *SectorMgr) ReturnReadPiece(ctx context.Context, callID storiface.CallID, ok bool, err *storiface.CallError) error

func (*SectorMgr) ReturnReleaseUnsealed added in v1.1.3

func (mgr *SectorMgr) ReturnReleaseUnsealed(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error

func (*SectorMgr) ReturnSealCommit1 added in v1.1.3

func (mgr *SectorMgr) ReturnSealCommit1(ctx context.Context, callID storiface.CallID, out storage.Commit1Out, err *storiface.CallError) error

func (*SectorMgr) ReturnSealCommit2 added in v1.1.3

func (mgr *SectorMgr) ReturnSealCommit2(ctx context.Context, callID storiface.CallID, proof storage.Proof, err *storiface.CallError) error

func (*SectorMgr) ReturnSealPreCommit1 added in v1.1.3

func (mgr *SectorMgr) ReturnSealPreCommit1(ctx context.Context, callID storiface.CallID, p1o storage.PreCommit1Out, err *storiface.CallError) error

func (*SectorMgr) ReturnSealPreCommit2 added in v1.1.3

func (mgr *SectorMgr) ReturnSealPreCommit2(ctx context.Context, callID storiface.CallID, sealed storage.SectorCids, err *storiface.CallError) error

func (*SectorMgr) ReturnUnsealPiece added in v1.1.3

func (mgr *SectorMgr) ReturnUnsealPiece(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error

func (*SectorMgr) SealCommit1

func (mgr *SectorMgr) SealCommit1(ctx context.Context, sid storage.SectorRef, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness, pieces []abi.PieceInfo, cids storage.SectorCids) (output storage.Commit1Out, err error)

func (*SectorMgr) SealCommit2

func (mgr *SectorMgr) SealCommit2(ctx context.Context, sid storage.SectorRef, phase1Out storage.Commit1Out) (proof storage.Proof, err error)

func (*SectorMgr) SealPreCommit1

func (mgr *SectorMgr) SealPreCommit1(ctx context.Context, sid storage.SectorRef, ticket abi.SealRandomness, pieces []abi.PieceInfo) (out storage.PreCommit1Out, err error)

func (*SectorMgr) SealPreCommit2

func (mgr *SectorMgr) SealPreCommit2(ctx context.Context, sid storage.SectorRef, phase1Out storage.PreCommit1Out) (cids storage.SectorCids, err error)

func (*SectorMgr) SectorsUnsealPiece added in v1.11.0

func (mgr *SectorMgr) SectorsUnsealPiece(ctx context.Context, sector storage.SectorRef, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize, randomness abi.SealRandomness, commd *cid.Cid) error

func (*SectorMgr) StageFakeData

func (mgr *SectorMgr) StageFakeData(mid abi.ActorID, spt abi.RegisteredSealProof) (storage.SectorRef, []abi.PieceInfo, error)

Jump to

Keyboard shortcuts

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