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 GenerateOptimizedPeers(n int, optCount int, curveFunc func(float64) float64) []bssd.OptimizedPeer
- func GeneratePeers(n int) []peer.ID
- func GenerateSessionID() uint64
- func GenerateWantlist(n int, ses uint64) *wantlist.SessionTrackedWantlist
- func IndexOf(blks []blocks.Block, c cid.Cid) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsBlock ¶
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 GenerateOptimizedPeers ¶
func GenerateOptimizedPeers(n int, optCount int, curveFunc func(float64) float64) []bssd.OptimizedPeer
GenerateOptimizedPeers creates n peer ids, with optimization fall off up to optCount, curveFunc to scale it
func GenerateSessionID ¶
func GenerateSessionID() uint64
GenerateSessionID make a unit session identifier.
func GenerateWantlist ¶
func GenerateWantlist(n int, ses uint64) *wantlist.SessionTrackedWantlist
GenerateWantlist makes a populated wantlist.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.