enable deferred decryption a bit later

This commit is contained in:
sinu
2024-03-06 14:24:41 -08:00
committed by Hendrik Eeckhaut
parent dd6edfc8a3
commit 6e5184b8aa

View File

@@ -261,11 +261,6 @@ pub async fn prover(
};
spawn_local(handled_prover_fut);
prover_ctrl
.defer_decryption()
.await
.map_err(|e| JsValue::from_str(&format!("failed to enable deferred decryption: {}", e)))?;
// Attach the hyper HTTP client to the TLS connection
log_phase(ProverPhases::AttachHttpClient);
let (mut request_sender, connection) =
@@ -306,6 +301,12 @@ pub async fn prover(
log_phase(ProverPhases::StartMpcConnection);
// Defer decryption of the response.
prover_ctrl
.defer_decryption()
.await
.map_err(|e| JsValue::from_str(&format!("failed to enable deferred decryption: {}", e)))?;
// Send the request to the Server and get a response via the MPC TLS connection
let response = request_sender
.send_request(unwrapped_request)