mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: use network tx for Pool::Pooled (#13159)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -35,7 +35,7 @@ use reth_optimism_rpc::{
|
||||
OpEthApi, SequencerClient,
|
||||
};
|
||||
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
|
||||
use reth_primitives::{BlockBody, TransactionSigned};
|
||||
use reth_primitives::{BlockBody, PooledTransactionsElement, TransactionSigned};
|
||||
use reth_provider::{
|
||||
providers::ChainStorage, BlockBodyReader, BlockBodyWriter, CanonStateSubscriptions,
|
||||
ChainSpecProvider, DBProvider, EthStorage, ProviderResult, ReadBodyInput,
|
||||
@ -633,8 +633,12 @@ impl OpNetworkBuilder {
|
||||
impl<Node, Pool> NetworkBuilder<Node, Pool> for OpNetworkBuilder
|
||||
where
|
||||
Node: FullNodeTypes<Types: NodeTypes<ChainSpec = OpChainSpec, Primitives = OpPrimitives>>,
|
||||
Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Node::Types>>>
|
||||
+ Unpin
|
||||
Pool: TransactionPool<
|
||||
Transaction: PoolTransaction<
|
||||
Consensus = TxTy<Node::Types>,
|
||||
Pooled = PooledTransactionsElement,
|
||||
>,
|
||||
> + Unpin
|
||||
+ 'static,
|
||||
{
|
||||
async fn build_network(
|
||||
|
||||
@ -31,8 +31,7 @@ where
|
||||
/// Returns the hash of the transaction.
|
||||
async fn send_raw_transaction(&self, tx: Bytes) -> Result<B256, Self::Error> {
|
||||
let recovered = recover_raw_transaction(tx.clone())?;
|
||||
let pool_transaction =
|
||||
<Self::Pool as TransactionPool>::Transaction::from_pooled(recovered.into());
|
||||
let pool_transaction = <Self::Pool as TransactionPool>::Transaction::from_pooled(recovered);
|
||||
|
||||
// On optimism, transactions are forwarded directly to the sequencer to be included in
|
||||
// blocks that it builds.
|
||||
|
||||
Reference in New Issue
Block a user