feat: make more block types generic (#12812)

This commit is contained in:
Arsenii Kulikov
2024-11-25 14:50:10 +04:00
committed by GitHub
parent 02824da4fc
commit dcaa06a01a
62 changed files with 534 additions and 333 deletions

View File

@@ -17,8 +17,8 @@ use reth_evm::{
};
use reth_execution_types::ExecutionOutcome;
use reth_primitives::{
proofs::calculate_transaction_root, Block, BlockBody, Receipt, SealedBlockWithSenders,
SealedHeader, TransactionSignedEcRecovered,
proofs::calculate_transaction_root, Block, BlockBody, BlockExt, Receipt,
SealedBlockWithSenders, SealedHeader, TransactionSignedEcRecovered,
};
use reth_provider::{
BlockReader, BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, ProviderError,

View File

@@ -315,7 +315,7 @@ pub trait EthTransactions: LoadTransaction<Provider: BlockReaderIdExt> {
{
async move {
if let Some(block) = self.block_with_senders(block_id).await? {
if let Some(tx) = block.transactions().nth(index) {
if let Some(tx) = block.transactions().get(index) {
return Ok(Some(tx.encoded_2718().into()))
}
}