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

Method verifier_status

bridge/src/client/client.rs:872–915  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

870 }
871
872 async fn verifier_status(&self) {
873 if self.verifier_context.is_none() {
874 panic!("Verifier context must be initialized");
875 }
876
877 for peg_in_graph in self.data.peg_in_graphs.iter() {
878 let peg_outs = peg_in_graph
879 .peg_out_graphs
880 .iter()
881 .map(|peg_out_id| {
882 self.data
883 .peg_out_graphs
884 .iter()
885 .find(|x| x.id() == peg_out_id)
886 .unwrap()
887 })
888 .collect::<Vec<_>>();
889 let peg_in_status = peg_in_graph
890 .verifier_status(
891 &self.esplora,
892 self.verifier_context.as_ref().unwrap(),
893 &peg_outs,
894 )
895 .await;
896
897 if peg_in_status == PegInVerifierStatus::Complete {
898 for peg_out_graph in peg_outs {
899 let peg_out_status = peg_out_graph
900 .verifier_status(&self.esplora, self.verifier_context.as_ref().unwrap())
901 .await;
902 println!(
903 "[VERIFIER]: Peg-out graph ID: {} status: {}\n",
904 peg_out_graph.id(),
905 peg_out_status
906 );
907 }
908 }
909 println!(
910 "[VERIFIER]: Peg-in graph ID: {} status: {}\n",
911 peg_in_graph.id(),
912 peg_in_status
913 );
914 }
915 }
916
917 pub async fn create_peg_in_graph(&mut self, input: Input, evm_address: &str) -> String {
918 if self.depositor_context.is_none() {

Callers 2

statusMethod · 0.45

Calls 2

as_refMethod · 0.80
idMethod · 0.45

Tested by

no test coverage detected