Skip to main content

Crate sc_network_bitswap

Crate sc_network_bitswap 

Source
Expand description

Bitswap client and server.

Structs§

BitswapHandle
Handle for submitting Bitswap requests.

Enums§

BitswapError
Bitswap request errors.

Constants§

BLAKE2B_256_MULTIHASH_CODE
Multihash code for BLAKE2b-256, per the multicodec table.
KECCAK_256_MULTIHASH_CODE
Multihash code for Keccak-256, per the multicodec table.
MAX_WANTED_BLOCKS
Maximum entries per Bitswap message.
RAW_CODEC
IPFS raw multicodec used for indexed transaction payload bytes.
SHA2_256_MULTIHASH_CODE
Multihash code for SHA2-256, per the multicodec table.

Functions§

is_cid_supported
Returns whether Bitswap supports a CID.
start
Build the Bitswap service, returning the service future and the user-facing handle.

Type Aliases§

Cid
A Cid that contains a multihash with an allocated size of 512 bits.
FetchItem
A fetched block or request error. Block bytes are Bytes because a block may be delivered to multiple concurrent requests without copying.