Skip to content

Commit 613e14f

Browse files
committed
Fmt
1 parent b88aa2f commit 613e14f

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

crates/batcher/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub struct Batcher {
103103
/// needs to be stopped, and all user_states locks need to be taken
104104
batch_state: Mutex<BatchState>,
105105
user_states: DashMap<Address, Arc<Mutex<UserState>>>,
106-
106+
107107
last_uploaded_batch_block: Mutex<u64>,
108108

109109
/// This is used to avoid multiple batches being submitted at the same time
@@ -708,7 +708,6 @@ impl Batcher {
708708
client_msg: Box<SubmitProofMessage>,
709709
ws_conn_sink: WsMessageSink,
710710
) -> Result<(), Error> {
711-
712711
let msg_nonce = client_msg.verification_data.nonce;
713712
debug!("Received message with nonce: {msg_nonce:?}");
714713
self.metrics.received_proofs.inc();
@@ -1526,7 +1525,6 @@ impl Batcher {
15261525
finalized_batch: &[BatchQueueEntry],
15271526
gas_price: U256,
15281527
) -> Result<(), BatcherError> {
1529-
15301528
let nonced_batch_verifcation_data: Vec<NoncedVerificationData> = finalized_batch
15311529
.iter()
15321530
.map(|entry| entry.nonced_verification_data.clone())

crates/batcher/src/types/batch_queue.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -847,18 +847,25 @@ mod test {
847847
&mut test_queue,
848848
gas_price,
849849
5000000, // Large byte size limit
850-
50, // Large proof quantity limit
850+
50, // Large proof quantity limit
851851
DEFAULT_CONSTANT_GAS_COST,
852852
);
853853

854854
// This should succeed and return the single proof
855-
assert!(finalized_batch.is_ok(), "Should successfully extract batch with single high-fee proof");
855+
assert!(
856+
finalized_batch.is_ok(),
857+
"Should successfully extract batch with single high-fee proof"
858+
);
856859
let batch = finalized_batch.unwrap();
857860
assert_eq!(batch.len(), 1, "Batch should contain exactly 1 proof");
858861
assert_eq!(batch[0].nonced_verification_data.max_fee, high_max_fee);
859-
862+
860863
// The queue should now be empty (no rejected entries to put back)
861-
assert_eq!(test_queue.len(), 0, "Queue should be empty after extracting the single viable proof");
864+
assert_eq!(
865+
test_queue.len(),
866+
0,
867+
"Queue should be empty after extracting the single viable proof"
868+
);
862869
}
863870

864871
#[test]

0 commit comments

Comments
 (0)