mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: abstract OpPooledTransaction and OpPool over consensus tx (#14256)
This commit is contained in:
@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user