mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: rename TransactionSignedEcRecovered to RecoveredTx (#13074)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
use alloy_primitives::Address;
|
||||
use reth_primitives::TransactionSignedEcRecovered;
|
||||
use reth_primitives::RecoveredTx;
|
||||
|
||||
/// Iterator that returns transactions for the block building process in the order they should be
|
||||
/// included in the block.
|
||||
@ -12,7 +12,7 @@ pub trait PayloadTransactions {
|
||||
&mut self,
|
||||
// In the future, `ctx` can include access to state for block building purposes.
|
||||
ctx: (),
|
||||
) -> Option<TransactionSignedEcRecovered>;
|
||||
) -> Option<RecoveredTx>;
|
||||
|
||||
/// Exclude descendants of the transaction with given sender and nonce from the iterator,
|
||||
/// because this transaction won't be included in the block.
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
use crate::PayloadTransactions;
|
||||
use alloy_consensus::Transaction;
|
||||
use alloy_primitives::Address;
|
||||
use reth_primitives::TransactionSignedEcRecovered;
|
||||
use reth_primitives::RecoveredTx;
|
||||
|
||||
/// An implementation of [`crate::traits::PayloadTransactions`] that yields
|
||||
/// a pre-defined set of transactions.
|
||||
@ -26,8 +26,8 @@ impl<T> PayloadTransactionsFixed<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl PayloadTransactions for PayloadTransactionsFixed<TransactionSignedEcRecovered> {
|
||||
fn next(&mut self, _ctx: ()) -> Option<TransactionSignedEcRecovered> {
|
||||
impl PayloadTransactions for PayloadTransactionsFixed<RecoveredTx> {
|
||||
fn next(&mut self, _ctx: ()) -> Option<RecoveredTx> {
|
||||
(self.index < self.transactions.len()).then(|| {
|
||||
let tx = self.transactions[self.index].clone();
|
||||
self.index += 1;
|
||||
@ -92,7 +92,7 @@ where
|
||||
B: PayloadTransactions,
|
||||
A: PayloadTransactions,
|
||||
{
|
||||
fn next(&mut self, ctx: ()) -> Option<TransactionSignedEcRecovered> {
|
||||
fn next(&mut self, ctx: ()) -> Option<RecoveredTx> {
|
||||
while let Some(tx) = self.before.next(ctx) {
|
||||
if let Some(before_max_gas) = self.before_max_gas {
|
||||
if self.before_gas + tx.transaction.gas_limit() <= before_max_gas {
|
||||
|
||||
Reference in New Issue
Block a user