Skip to content

Commit eeb557d

Browse files
committed
refactor: compare with Ordering
1 parent 8fc52d5 commit eeb557d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • batcher/aligned-batcher/src

batcher/aligned-batcher/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use types::batch_state::BatchState;
1717
use types::user_state::UserState;
1818

1919
use batch_queue::calculate_batch_size;
20+
use std::cmp::Ordering;
2021
use std::collections::HashMap;
2122
use std::env;
2223
use std::net::SocketAddr;
@@ -809,7 +810,7 @@ impl Batcher {
809810

810811
if let Some(lowest_entry_priority) = batch_state_lock.lowest_entry_priority() {
811812
// If the new proof has more priority than the lowest one in the queue, discard the latter one and push the new one
812-
if msg_entry_priority > lowest_entry_priority {
813+
if lowest_entry_priority.cmp(&msg_entry_priority) == Ordering::Greater {
813814
let Some((removed_entry, _)) = batch_state_lock.batch_queue.pop() else {
814815
warn!("Failed to remove lowest-priority proof despite queue being full.");
815816
std::mem::drop(batch_state_lock);

0 commit comments

Comments
 (0)