MCPcopy Create free account
hub / github.com/BitVM/BitVM / get_peg_out_graph_mut

Method get_peg_out_graph_mut

bridge/src/client/client.rs:234–239  ·  view source on GitHub ↗

Get a mutable reference to a PegOutGraph by its ID

(&mut self, id: &str)

Source from the content-addressed store, hash-verified

232
233 /// Get a mutable reference to a PegOutGraph by its ID
234 pub fn get_peg_out_graph_mut(&mut self, id: &str) -> Option<&mut PegOutGraph> {
235 self.data
236 .peg_out_graphs
237 .iter_mut()
238 .find(|graph| graph.id() == id)
239 }
240
241 // TODO: This should be private. Currently used in the fees test. See if it can be refactored.
242 pub fn private_data(&self) -> &BitVMClientPrivateData {

Callers 1

get_peg_out_graph_mutFunction · 0.80

Calls 1

idMethod · 0.45

Tested by 1

get_peg_out_graph_mutFunction · 0.64