pub trait PayloadTransactions {
type Transaction;
// Required methods
fn next(&mut self, ctx: ()) -> Option<RecoveredTx<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§
Sourcetype Transaction
type Transaction
The transaction type this iterator yields.
Required Methods§
Sourcefn next(&mut self, ctx: ()) -> Option<RecoveredTx<Self::Transaction>>
fn next(&mut self, ctx: ()) -> Option<RecoveredTx<Self::Transaction>>
Returns the next transaction to include in the block.
Sourcefn mark_invalid(&mut self, sender: Address, nonce: u64)
fn mark_invalid(&mut self, sender: Address, nonce: u64)
Exclude descendants of the transaction with given sender and nonce from the iterator, because this transaction won’t be included in the block.