Skip to content

Commit fc93d60

Browse files
committed
Fmt
1 parent 64a58d8 commit fc93d60

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

crates/batcher/src/lib.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub struct Batcher {
102102
/// - Batch creation needs to be able to change all the states, so all processing
103103
/// needs to be stopped, and all user_states locks need to be taken
104104
batch_state: Mutex<BatchState>,
105-
105+
106106
/// Flag to indicate when recovery is in progress
107107
/// When true, message handlers will return ServerBusy responses
108108
/// It's used a way to "lock" all the user_states at the same time
@@ -771,7 +771,11 @@ impl Batcher {
771771
if *self.is_recovering_from_submission_failure.read().await {
772772
warn!(
773773
"Rejecting proof submission from {} during restoration (nonce: {})",
774-
client_msg.verification_data.verification_data.proof_generator_addr, msg_nonce
774+
client_msg
775+
.verification_data
776+
.verification_data
777+
.proof_generator_addr,
778+
msg_nonce
775779
);
776780
let response = SubmitProofResponseMessage::ServerBusy;
777781
send_message(ws_conn_sink, response).await;
@@ -1629,9 +1633,8 @@ impl Batcher {
16291633
info!("Queue recovered from submission failure, resuming user processing and updating user states metadata");
16301634
std::mem::drop(batch_state_lock);
16311635
*self.is_recovering_from_submission_failure.write().await = false;
1632-
16331636

1634-
info!("Updating user states after proof restoration...");
1637+
info!("Updating user states after proof restoration...");
16351638
if let Err(e) = self
16361639
.update_user_states_from_queue_state(users_with_restored_proofs)
16371640
.await
@@ -1641,7 +1644,6 @@ impl Batcher {
16411644
e
16421645
);
16431646
}
1644-
16451647
}
16461648

16471649
/// Takes the finalized batch as input and:

crates/sdk/src/communication/messaging.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ async fn handle_batcher_response(msg: Message) -> Result<BatchInclusionData, Sub
271271
}
272272
Ok(SubmitProofResponseMessage::ServerBusy) => {
273273
error!("Server is busy processing requests, please retry. Funds have not been spent.");
274-
Err(SubmitError::GenericError("Server is busy processing requests, please retry".to_string()))
274+
Err(SubmitError::GenericError(
275+
"Server is busy processing requests, please retry".to_string(),
276+
))
275277
}
276278
Err(e) => {
277279
error!(

0 commit comments

Comments
 (0)