feat: abstract OpPooledTransaction and OpPool over consensus tx (#14256)

This commit is contained in:
Arsenii Kulikov
2025-02-06 15:26:06 +04:00
committed by GitHub
parent 5662508149
commit 823d065071
9 changed files with 123 additions and 184 deletions

View File

@ -35,6 +35,7 @@ use reth_payload_util::{
use reth_primitives::Recovered;
use reth_provider::providers::BlockchainProvider;
use reth_tasks::TaskManager;
use reth_transaction_pool::PoolTransaction;
use std::sync::Arc;
use tokio::sync::Mutex;
@ -68,13 +69,12 @@ impl OpPayloadTransactions<OpPooledTransaction> for CustomTxPriority {
..Default::default()
};
let signature = sender.sign_transaction_sync(&mut end_of_block_tx).unwrap();
let end_of_block_tx = Recovered::new_unchecked(
let end_of_block_tx = OpPooledTransaction::from_pooled(Recovered::new_unchecked(
op_alloy_consensus::OpPooledTransaction::Eip1559(
end_of_block_tx.into_signed(signature),
),
sender.address(),
)
.into();
));
PayloadTransactionsChain::new(
BestPayloadTransactions::new(pool.best_transactions_with_attributes(attr)),