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

Method handle_broadcast

bridge/src/client/cli/query_command.rs:504–522  ·  view source on GitHub ↗
(&mut self, matches: &ArgMatches)

Source from the content-addressed store, hash-verified

502 }
503
504 pub async fn handle_broadcast(&mut self, matches: &ArgMatches) -> Response {
505 self.sync().await;
506 let arg = "GRAPH_ID";
507 let Some(peg_in_graph_id) = matches.get_one::<String>(arg) else {
508 return Response::new(
509 ResponseStatus::NOK(format!("Missing argument: {}", arg)),
510 None,
511 );
512 };
513 let result = self
514 .client
515 .retry_broadcast_peg_in_deposit(peg_in_graph_id)
516 .await;
517
518 match result {
519 Ok(result) => Response::new(ResponseStatus::OK, Some(result)),
520 Err(err) => Response::new(ResponseStatus::NOK(err), None),
521 }
522 }
523
524 pub fn peg_in_graphs_command() -> Command {
525 Command::new("pegins")

Callers 1

mainFunction · 0.80

Calls 2

syncMethod · 0.45

Tested by

no test coverage detected