Skip to content

Commit

Permalink
fix:tee registration status judge (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
democ98 authored May 6, 2024
1 parent fb30b34 commit 42b5f4f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions standalone/teeworker/cifrost/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,15 @@ async fn register_worker(
error!("FailedToCallRegisterWorker: {:?}", ret);
return Err(anyhow!(Error::FailedToCallRegisterWorker));
}
match ret.unwrap().wait_for_finalized_success().await {
Ok(e) => {
info!("Tee registration successful in block hash:{:?}, and the transaction hash is :{:?}",e.block_hash(),e.extrinsic_hash())
},
Err(e) => {
error!("Tee registration transaction has been finalized, but registration failed :{:?}",e.to_string());
return Err(anyhow!(Error::FailedToCallRegisterWorker));
},
};
signer.increment_nonce();
Ok(())
}
Expand Down

0 comments on commit 42b5f4f

Please sign in to comment.