PayloadTransactions

Trait PayloadTransactions 

Source
pub trait PayloadTransactions {
    type Transaction;

    // Required methods
    fn next(&mut self, ctx: ()) -> Option<Self::Transaction>;
    fn mark_invalid(&mut self, sender: Address, nonce: u64);
}
Expand description

Iterator that returns transactions for the block building process in the order they should be included in the block.

Can include transactions from the pool and other sources (alternative pools, sequencer-originated transactions, etc.).

Required Associated Types§

Source

type Transaction

The transaction type this iterator yields.

Required Methods§

Source

fn next(&mut self, ctx: ()) -> Option<Self::Transaction>

Returns the next transaction to include in the block.

Source

fn mark_invalid(&mut self, sender: Address, nonce: u64)

Marks the transaction identified by sender and nonce as invalid for this iterator.

Implementations must ensure that subsequent transactions returned from this iterator do not depend on this transaction. For example, they may choose to stop yielding any further transactions from this sender in the current iteration.

Implementors§

Source§

impl<A, B> PayloadTransactions for PayloadTransactionsChain<A, B>
where A: PayloadTransactions<Transaction: PoolTransaction>, B: PayloadTransactions<Transaction = A::Transaction>,

Source§

impl<T> PayloadTransactions for NoopPayloadTransactions<T>

Source§

impl<T, I> PayloadTransactions for BestPayloadTransactions<T, I>
where T: PoolTransaction, I: Iterator<Item = Arc<ValidPoolTransaction<T>>>,

Source§

impl<T: Clone> PayloadTransactions for PayloadTransactionsFixed<T>