Skip to content

Commit

Permalink
Fix (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
xqft authored Sep 30, 2024
1 parent 91efe0d commit 0de6199
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/abi/MinaAccountValidation.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/abi/MinaStateSettlement.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions core/src/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ pub async fn update_bridge_chain(
) -> Result<(), String> {
let (proof, pub_input) = get_mina_proof_of_state(rpc_url, chain, eth_rpc_url).await?;

let candidate_root_state_hash = pub_input.candidate_chain_state_hashes.first().unwrap();
if is_state_verified(&candidate_root_state_hash.to_string(), chain, eth_rpc_url).await? {
debug!("Candidate root {candidate_root_state_hash} is verified, so the bridge chain is updated");
if pub_input.candidate_chain_state_hashes
== get_bridge_chain_state_hashes(chain, eth_rpc_url).await?
{
debug!("The bridge chain is updated to the candidate chain");
return Err("Latest chain is already verified".to_string());
}

Expand Down
2 changes: 1 addition & 1 deletion example/app/abi/SudokuValidity.json

Large diffs are not rendered by default.

0 comments on commit 0de6199

Please sign in to comment.