Skip to content

Commit

Permalink
fix timing
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev43 committed Sep 17, 2022
1 parent 711efe8 commit 3acf91d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions fhe_contract/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ async fn deploy() -> Result<String, Box<dyn std::error::Error>> {
"deployment.json".to_string(),
json!({"arweave_id": tx_id, "contract_id": contract_id}).to_string(),
)?;

println!("Deploy: Arweave Tx ID: {} ", tx_id);

// we wait till mined (main txn for now)
let mined_res = ar.wait_till_mined(&tx_id).await.unwrap();
println!("{:?}", mined_res);
Expand Down Expand Up @@ -424,15 +424,16 @@ pub async fn run() -> Result<(), Box<dyn std::error::Error>> {
init_zk(&contract_id).boxed(),
// init the state
init_state(&contract_id).boxed(),
// fetch the zk info to populate our cache
fetch_zk(&contract_id).boxed(),
];
let results = future::join_all(futures).await;

// we unwrap all ensuring no erro
for r in results {
r.unwrap();
}

// fetch the zk info to populate our cache
fetch_zk(&contract_id).await?;
// vote on who we want
vote(&contract_id, &1).await?;
// fetch all the txn, the latest
Expand Down

0 comments on commit 3acf91d

Please sign in to comment.