MCPcopy Create free account
hub / github.com/argumentcomputer/ix / try_get_block

Method try_get_block

crates/kernel/src/tc.rs:272–281  ·  view source on GitHub ↗
(
    &mut self,
    id: &KId<M>,
  )

Source from the content-addressed store, hash-verified

270 .ok_or_else(|| TcError::UnknownConst(id.addr.clone()))
271 }
272
273 pub fn has_const(&mut self, id: &KId<M>) -> Result<bool, TcError<M>> {
274 Ok(self.try_get_const(id)?.is_some())
275 }
276
277 pub fn try_get_block(
278 &mut self,
279 id: &KId<M>,
280 ) -> Result<Option<Vec<KId<M>>>, TcError<M>> {
281 if let Some(members) = self.env.get_block(id) {
282 return Ok(Some(members));
283 }
284 self.lazy_ingress_addr(&id.addr)?;

Callers 9

check_block_bodyMethod · 0.80
check_inductiveMethod · 0.80
find_peer_recursorsMethod · 0.80
check_recursorMethod · 0.80
gather_peer_majorsMethod · 0.80

Calls 2

get_blockMethod · 0.80
lazy_ingress_addrMethod · 0.80

Tested by

no test coverage detected