Skip to content

Commit 5b9a5f7

Browse files
committed
Fmt
1 parent b61f8f4 commit 5b9a5f7

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

crates/batcher/src/lib.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,12 @@ impl Batcher {
727727
}
728728

729729
let cached_user_nonce = {
730-
let user_states_guard = match timeout(MESSAGE_HANDLER_LOCK_TIMEOUT, self.user_states.read()).await {
730+
let user_states_guard = match timeout(
731+
MESSAGE_HANDLER_LOCK_TIMEOUT,
732+
self.user_states.read(),
733+
)
734+
.await
735+
{
731736
Ok(guard) => guard,
732737
Err(_) => {
733738
warn!("User states read lock acquisition timed out in handle_get_nonce_for_address_msg");
@@ -861,7 +866,9 @@ impl Batcher {
861866
// If it was not present, then the user nonce is queried to the Aligned contract.
862867
// Lastly, we get a lock of the batch state again and insert the user state if it was still missing.
863868

864-
let is_user_in_state = match timeout(MESSAGE_HANDLER_LOCK_TIMEOUT, self.user_states.read()).await {
869+
let is_user_in_state = match timeout(MESSAGE_HANDLER_LOCK_TIMEOUT, self.user_states.read())
870+
.await
871+
{
865872
Ok(user_states_guard) => user_states_guard.contains_key(&addr),
866873
Err(_) => {
867874
warn!("User states read lock acquisition timed out in handle_submit_proof_msg (user check)");
@@ -905,7 +912,9 @@ impl Batcher {
905912
debug!("Dummy user state for address {addr:?} created");
906913
}
907914

908-
let user_state_ref = match timeout(MESSAGE_HANDLER_LOCK_TIMEOUT, self.user_states.read()).await {
915+
let user_state_ref = match timeout(MESSAGE_HANDLER_LOCK_TIMEOUT, self.user_states.read())
916+
.await
917+
{
909918
Ok(user_states_guard) => user_states_guard.get(&addr).cloned(),
910919
Err(_) => {
911920
warn!("User states read lock acquisition timed out in handle_submit_proof_msg (user retrieval)");

crates/batcher/src/types/batch_queue.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ pub(crate) fn extract_batch_directly(
170170
let (rejected_entry, rejected_priority) = batch_queue.pop().unwrap();
171171

172172
// Update batch size
173-
let verification_data_size = rejected_entry.nonced_verification_data.cbor_size_upper_bound();
173+
let verification_data_size = rejected_entry
174+
.nonced_verification_data
175+
.cbor_size_upper_bound();
174176
batch_size -= verification_data_size;
175177

176178
rejected_entries.push((rejected_entry, rejected_priority));

0 commit comments

Comments
 (0)