Trait sc_network::bitswap::BitswapT
source · pub trait BitswapT<B: BlockT> {
fn indexed_transaction(
&self,
hash: <B as BlockT>::Hash
) -> Result<Option<Vec<u8>>>;
fn ready_blocks(&mut self) -> &mut VecDeque<(PeerId, BitswapMessage)>;
}
Expand description
Bitswap trait
Required Methods§
sourcefn indexed_transaction(
&self,
hash: <B as BlockT>::Hash
) -> Result<Option<Vec<u8>>>
fn indexed_transaction(
&self,
hash: <B as BlockT>::Hash
) -> Result<Option<Vec<u8>>>
Get single indexed transaction by content hash.
Note that this will only fetch transactions
that are indexed by the runtime with storage_index_transaction
.
sourcefn ready_blocks(&mut self) -> &mut VecDeque<(PeerId, BitswapMessage)>
fn ready_blocks(&mut self) -> &mut VecDeque<(PeerId, BitswapMessage)>
Queue of blocks ready to be sent out on poll()