chore(op): remove optimism feature from LoadPendingBlock (#9503)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Emilia Hane
2024-07-16 18:30:14 +02:00
committed by GitHub
parent 55dc12d741
commit 458251fff7
5 changed files with 17 additions and 108 deletions

View File

@ -1,12 +1,13 @@
//! Loads OP pending block for a RPC response.
use reth_primitives::{
revm_primitives::{BlockEnv, ExecutionResult},
BlockNumber, Receipt, TransactionSignedEcRecovered, B256,
use reth_evm::ConfigureEvm;
use reth_primitives::{revm_primitives::BlockEnv, BlockNumber, B256};
use reth_provider::{
BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ExecutionOutcome, StateProviderFactory,
};
use reth_provider::{ChainSpecProvider, ExecutionOutcome};
use reth_rpc_eth_api::helpers::LoadPendingBlock;
use reth_rpc_eth_types::PendingBlock;
use reth_transaction_pool::TransactionPool;
use crate::OpEthApi;
@ -17,15 +18,12 @@ where
#[inline]
fn provider(
&self,
) -> impl reth_provider::BlockReaderIdExt
+ reth_provider::EvmEnvProvider
+ reth_provider::ChainSpecProvider
+ reth_provider::StateProviderFactory {
) -> impl BlockReaderIdExt + EvmEnvProvider + ChainSpecProvider + StateProviderFactory {
self.inner.provider()
}
#[inline]
fn pool(&self) -> impl reth_transaction_pool::TransactionPool {
fn pool(&self) -> impl TransactionPool {
self.inner.pool()
}
@ -35,26 +33,10 @@ where
}
#[inline]
fn evm_config(&self) -> &impl reth_evm::ConfigureEvm {
fn evm_config(&self) -> &impl ConfigureEvm {
self.inner.evm_config()
}
fn assemble_receipt(
&self,
tx: &TransactionSignedEcRecovered,
result: ExecutionResult,
cumulative_gas_used: u64,
) -> Receipt {
Receipt {
tx_type: tx.tx_type(),
success: result.is_success(),
cumulative_gas_used,
logs: result.into_logs().into_iter().map(Into::into).collect(),
deposit_nonce: None,
deposit_receipt_version: None,
}
}
fn receipts_root(
&self,
_block_env: &BlockEnv,