MCPcopy Create free account
hub / github.com/ceramicnetwork/rust-ceramic / notify_new_blocks

Method notify_new_blocks

p2p/src/behaviour.rs:207–217  ·  view source on GitHub ↗
(&self, blocks: Vec<Block>)

Source from the content-addressed store, hash-verified

205 }
206
207 pub fn notify_new_blocks(&self, blocks: Vec<Block>) {
208 if let Some(bs) = self.bitswap.as_ref() {
209 let client = bs.client().clone();
210 let handle = tokio::runtime::Handle::current();
211 tokio::task::block_in_place(move || {
212 if let Err(err) = handle.block_on(client.notify_new_blocks(&blocks)) {
213 warn!("failed to notify bitswap about blocks: {:?}", err);
214 }
215 });
216 }
217 }
218
219 pub fn kad_bootstrap(&mut self) -> Result<()> {
220 if let Some(kad) = self.kad.as_mut() {

Callers 1

handle_rpc_messageMethod · 0.45

Calls 3

as_refMethod · 0.45
cloneMethod · 0.45
clientMethod · 0.45

Tested by

no test coverage detected