Documentation ¶
Index ¶
- func Connect(tn1, tn2 *TestNode) error
- func CreateRandomBlock(t testing.TB, bs blockstore.Blockstore) *blocks.BasicBlock
- func FormatMsgLookup(t *testing.T, chAddr address.Address) *filecoin.MsgLookup
- func ThisDir(t testing.TB) string
- type BytesGetter
- type FakeDTType
- type FakeDTValidator
- type TestNode
- func (tn *TestNode) CreateRandomFile(t testing.TB, size int) string
- func (tn *TestNode) LoadFileToNewStore(ctx context.Context, t testing.TB, dirPath string) (ipld.Link, multistore.StoreID, []byte)
- func (tn *TestNode) LoadFileToStore(ctx context.Context, t testing.TB, store *multistore.Store, path string) (ipld.Link, []byte)
- func (tn *TestNode) NukeBlockstore(ctx context.Context, t testing.TB)
- func (tn *TestNode) SetupDataTransfer(ctx context.Context, t testing.TB)
- func (tn *TestNode) SetupGraphSync(ctx context.Context)
- func (tn *TestNode) ThisDir(t testing.TB, p string) string
- func (tn *TestNode) VerifyFileTransferred(ctx context.Context, t testing.TB, dag ipldformat.DAGService, link cid.Cid, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRandomBlock ¶
func CreateRandomBlock(t testing.TB, bs blockstore.Blockstore) *blocks.BasicBlock
func FormatMsgLookup ¶
Types ¶
type BytesGetter ¶
type BytesGetter struct {
// contains filtered or unexported fields
}
func (*BytesGetter) Bytes ¶
func (bg *BytesGetter) Bytes() []byte
func (*BytesGetter) UnmarshalCBOR ¶
func (bg *BytesGetter) UnmarshalCBOR(r io.Reader) error
type FakeDTType ¶
type FakeDTType struct {
Data string
}
FakeDTType simple fake type for using with registries
func (*FakeDTType) MarshalCBOR ¶
func (t *FakeDTType) MarshalCBOR(w io.Writer) error
func (FakeDTType) Type ¶
func (ft FakeDTType) Type() datatransfer.TypeIdentifier
Type satisfies registry.Entry
func (*FakeDTType) UnmarshalCBOR ¶
func (t *FakeDTType) UnmarshalCBOR(r io.Reader) error
type FakeDTValidator ¶
type FakeDTValidator struct{}
func (*FakeDTValidator) ValidatePull ¶
func (v *FakeDTValidator) ValidatePull(isRestart bool, chid datatransfer.ChannelID, receiver peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.VoucherResult, error)
func (*FakeDTValidator) ValidatePush ¶
func (v *FakeDTValidator) ValidatePush(isRestart bool, chid datatransfer.ChannelID, sender peer.ID, voucher datatransfer.Voucher, baseCid cid.Cid, selector ipld.Node) (datatransfer.VoucherResult, error)
type TestNode ¶
type TestNode struct { Ds datastore.Batching Bs blockstore.Blockstore DAG ipldformat.DAGService Host host.Host LinkSys ipld.LinkSystem Gs graphsync.GraphExchange DTNet dtnet.DataTransferNetwork DTStore datastore.Batching DTTmpDir string Dt datatransfer.Manager Ms *multistore.MultiStore OrigBytes []byte }
func NewTestNode ¶
func (*TestNode) CreateRandomFile ¶
func (*TestNode) LoadFileToNewStore ¶
func (*TestNode) LoadFileToStore ¶
func (*TestNode) NukeBlockstore ¶
func (*TestNode) SetupDataTransfer ¶
func (*TestNode) SetupGraphSync ¶
func (*TestNode) VerifyFileTransferred ¶
func (tn *TestNode) VerifyFileTransferred(ctx context.Context, t testing.TB, dag ipldformat.DAGService, link cid.Cid, origBytes []byte)
Click to show internal directories.
Click to hide internal directories.