Documentation ¶
Index ¶
- func ContainsBlock(blks []blocks.Block, block blocks.Block) bool
- func ContainsPeer(peers []peer.ID, p peer.ID) bool
- func GenerateBlocksOfSize(n int, size int64) []blocks.Block
- func GenerateCids(n int) []cid.Cid
- func GenerateMessageEntries(n int, isCancel bool) []*bsmsg.Entry
- func GeneratePeers(n int) []peer.ID
- func GenerateSessionID() uint64
- func GenerateWantlist(n int, ses uint64) *wantlist.ThreadSafe
- func IndexOf(blks []blocks.Block, c cid.Cid) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsBlock ¶
func ContainsBlock(blks []blocks.Block, block blocks.Block) bool
ContainsBlock returns true if a block is found n a list of blocks
func ContainsPeer ¶
ContainsPeer returns true if a peer is found n a list of peers.
func GenerateBlocksOfSize ¶
GenerateBlocksOfSize generates a series of blocks of the given byte size
func GenerateMessageEntries ¶
GenerateMessageEntries makes fake bitswap message entries.
func GenerateSessionID ¶
func GenerateSessionID() uint64
GenerateSessionID make a unit session identifier.
func GenerateWantlist ¶
func GenerateWantlist(n int, ses uint64) *wantlist.ThreadSafe
GenerateWantlist makes a populated wantlist.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.