MCPcopy Index your code
hub / github.com/BitVM/BitVM / get_peg_in_graph

Method get_peg_in_graph

bridge/src/client/client.rs:1347–1355  ·  view source on GitHub ↗
(&self, peg_in_graph_id: &String)

Source from the content-addressed store, hash-verified

1345 }
1346
1347 fn get_peg_in_graph(&self, peg_in_graph_id: &String) -> Result<&PegInGraph, Error> {
1348 self.data
1349 .peg_in_graphs
1350 .iter()
1351 .find(|peg_in_graph| peg_in_graph.id().eq(peg_in_graph_id))
1352 .ok_or(Error::Client(ClientError::PegInGraphNotFound(
1353 peg_in_graph_id.clone(),
1354 )))
1355 }
1356
1357 fn find_peg_in_or_fail<'a>(
1358 data: &'a mut BitVMClientPublicData,

Calls 2

cloneMethod · 0.80
idMethod · 0.45

Tested by

no test coverage detected