reth::transaction_pool

Trait TransactionOrdering

pub trait TransactionOrdering:
    Send
    + Sync
    + 'static {
    type PriorityValue: Ord + Clone + Default + Debug + Send + Sync;
    type Transaction: PoolTransaction;

    // Required method
    fn priority(
        &self,
        transaction: &Self::Transaction,
        base_fee: u64,
    ) -> Priority<Self::PriorityValue>;
}
Expand description

Transaction ordering trait to determine the order of transactions.

Decides how transactions should be ordered within the pool, depending on a Priority value.

The returned priority must reflect total order.

Required Associated Types§

type PriorityValue: Ord + Clone + Default + Debug + Send + Sync

Priority of a transaction.

Higher is better.

type Transaction: PoolTransaction

The transaction type to determine the priority of.

Required Methods§

fn priority( &self, transaction: &Self::Transaction, base_fee: u64, ) -> Priority<Self::PriorityValue>

Returns the priority score for the given transaction.

Implementors§

§

impl<T> TransactionOrdering for CoinbaseTipOrdering<T>
where T: PoolTransaction + 'static,

§

type PriorityValue = Uint<256, 4>

§

type Transaction = T