Documentation ¶
Index ¶
- func ContainsBlock(blks []blocks.Block, block blocks.Block) bool
- func ContainsKey(ks []cid.Cid, c cid.Cid) 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 IndexOf(blks []blocks.Block, c cid.Cid) int
- func MatchKeysIgnoreOrder(ks1 []cid.Cid, ks2 []cid.Cid) bool
- func MatchPeersIgnoreOrder(ps1 []peer.ID, ps2 []peer.ID) bool
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 ContainsKey ¶
ContainsKey returns true if a key is found n a list of CIDs.
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 MatchKeysIgnoreOrder ¶
MatchKeysIgnoreOrder returns true if the lists of CIDs match (even if they're in a different order)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.