Trait reth_transaction_pool::TransactionOrdering

source ·
pub trait TransactionOrdering:
    Send
    + Sync
    + 'static {
    type PriorityValue: Ord + Clone + Default + Debug + Send + Sync;
    type Transaction: PoolTransaction<Pooled = PooledTransactionsElementEcRecovered, Consensus = TransactionSignedEcRecovered>;

    // 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§

source

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

Priority of a transaction.

Higher is better.

source

type Transaction: PoolTransaction<Pooled = PooledTransactionsElementEcRecovered, Consensus = TransactionSignedEcRecovered>

The transaction type to determine the priority of.

Required Methods§

source

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

Returns the priority score for the given transaction.

Implementors§

source§

impl<T> TransactionOrdering for CoinbaseTipOrdering<T>
where T: PoolTransaction<Pooled = PooledTransactionsElementEcRecovered, Consensus = TransactionSignedEcRecovered> + 'static,

source§

type PriorityValue = Uint<256, 4>

source§

type Transaction = T