Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Aug 30, 2024
1 parent b367eb6 commit b55405d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/katana/pool/src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ impl<T, O: PoolOrd> PartialOrd for PendingTx<T, O> {
}
}

/// When two transactions have the same priority, we want to prioritize the one that was added
/// first. So, when an incoming transaction with similar priority value is added to the
/// [BTreeSet](std::collections::BTreeSet), the transaction is assigned a 'greater'
/// [Ordering](std::cmp::Ordering) so that it will be placed after the existing ones. This is
/// because items in a BTree is ordered from lowest to highest.
// When two transactions have the same priority, we want to prioritize the one that was added
// first. So, when an incoming transaction with similar priority value is added to the
// [BTreeSet](std::collections::BTreeSet), the transaction is assigned a 'greater'
// [Ordering](std::cmp::Ordering) so that it will be placed after the existing ones. This is
// because items in a BTree is ordered from lowest to highest.
impl<T, O: PoolOrd> Ord for PendingTx<T, O> {
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
match self.priority.cmp(&other.priority) {
Expand Down

0 comments on commit b55405d

Please sign in to comment.