Skip to content

Commit 1a706b2

Browse files
committed
fix: cargo fmt
1 parent cc7cc05 commit 1a706b2

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

batcher/aligned-batcher/src/lib.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,10 @@ impl Batcher {
803803
debug!("Batch queue is full. Evaluating if the incoming proof can replace a lower-priority entry.");
804804

805805
// This cannot panic, if the batch queue is full it has at least one item
806-
let (lowest_priority_entry, _) = batch_state_lock.batch_queue.peek().expect("Batch queue was expected to be full, but somehow no item was inside");
806+
let (lowest_priority_entry, _) = batch_state_lock
807+
.batch_queue
808+
.peek()
809+
.expect("Batch queue was expected to be full, but somehow no item was inside");
807810

808811
let lowest_fee_in_queue = lowest_priority_entry.nonced_verification_data.max_fee;
809812

@@ -814,9 +817,11 @@ impl Batcher {
814817
// So this will never eject a proof of the same user with a lower nonce
815818
// which is the expected behaviour
816819
if new_proof_fee > lowest_fee_in_queue {
817-
818820
// This cannot panic, if the batch queue is full it has at least one item
819-
let (removed_entry, _) = batch_state_lock.batch_queue.pop().expect("Batch queue was expected to be full, but somehow no item was inside");
821+
let (removed_entry, _) = batch_state_lock
822+
.batch_queue
823+
.pop()
824+
.expect("Batch queue was expected to be full, but somehow no item was inside");
820825

821826
info!(
822827
"Incoming proof (nonce: {}, fee: {}) has higher fee. Replacing lowest fee proof from sender {} with nonce {}.",

batcher/aligned-batcher/src/types/batch_state.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ impl BatchState {
246246
if let Entry::Occupied(mut user_state) = self.user_states.entry(addr) {
247247
user_state.get_mut().proofs_in_batch -= 1;
248248
user_state.get_mut().nonce -= U256::one();
249-
user_state.get_mut().total_fees_in_queue -= removed_entry.nonced_verification_data.max_fee;
249+
user_state.get_mut().total_fees_in_queue -=
250+
removed_entry.nonced_verification_data.max_fee;
250251
user_state.get_mut().last_max_fee_limit = new_last_max_fee_limit;
251252
}
252253
}

0 commit comments

Comments
 (0)