MCPcopy Create free account
hub / github.com/dfinity/orbit / validate_commit_proposed_batch

Method validate_commit_proposed_batch

tools/dfx-orbit/src/asset/util.rs:67–91  ·  view source on GitHub ↗
(
        &self,
        batch_id: Nat,
        evidence: String,
    )

Source from the content-addressed store, hash-verified

65 }
66
67 pub(super) async fn validate_commit_proposed_batch(
68 &self,
69 batch_id: Nat,
70 evidence: String,
71 ) -> anyhow::Result<()> {
72 let evidence = hex::decode(evidence)?;
73 let arg = CommitProposedBatchArguments {
74 batch_id,
75 evidence: ByteBuf::from(evidence),
76 };
77
78 let method: AsyncCaller<'_, (Result<String, String>,)> = self
79 .canister_agent
80 .update("validate_commit_proposed_batch")
81 .with_arg(arg)
82 .build();
83
84 let result: Result<String, String> = method
85 .call_and_wait_one()
86 .await
87 .with_context(|| "Failed to fetch current upload proposal from asset canister")?;
88 result.map_err(|str| anyhow!(str))?;
89
90 Ok(())
91 }
92}

Callers 1

verifyMethod · 0.80

Calls 2

updateMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected