chore(rpc): remove use of extensible transaction + receipt types (#9774)

This commit is contained in:
Emilia Hane
2024-09-20 17:00:28 +02:00
committed by GitHub
parent 05f862af41
commit b5adf24a65
52 changed files with 833 additions and 664 deletions

View File

@@ -1,6 +1,5 @@
use std::{marker::PhantomData, pin::Pin};
use alloy_network::Network;
use alloy_primitives::{BlockHash, BlockNumber, Bytes, B256};
use alloy_rpc_types::BlockNumberOrTag;
use eyre::Ok;
@@ -11,13 +10,15 @@ use reth::{
network::PeersHandleProvider,
providers::{BlockReader, BlockReaderIdExt, CanonStateSubscriptions, StageCheckpointReader},
rpc::{
api::eth::helpers::{EthApiSpec, EthTransactions, TraceExt},
types::{engine::PayloadStatusEnum, AnyTransactionReceipt},
api::eth::{
helpers::{EthApiSpec, EthTransactions, TraceExt},
FullEthApiTypes,
},
types::engine::PayloadStatusEnum,
},
};
use reth_chainspec::ChainSpec;
use reth_node_builder::{EthApiTypes, NodeAddOns, NodeTypesWithEngine};
use reth_rpc_types::WithOtherFields;
use reth_node_builder::{NodeAddOns, NodeTypesWithEngine};
use reth_stages_types::StageId;
use tokio_stream::StreamExt;
@@ -87,13 +88,8 @@ where
attributes_generator: impl Fn(u64) -> Engine::PayloadBuilderAttributes + Copy,
) -> eyre::Result<Vec<(Engine::BuiltPayload, Engine::PayloadBuilderAttributes)>>
where
<Engine as EngineTypes>::ExecutionPayloadV3:
From<Engine::BuiltPayload> + PayloadEnvelopeExt,
AddOns::EthApi: EthApiSpec + EthTransactions + TraceExt,
<AddOns::EthApi as EthApiTypes>::NetworkTypes: Network<
TransactionResponse = WithOtherFields<alloy_rpc_types::Transaction>,
ReceiptResponse = AnyTransactionReceipt,
>,
Engine::ExecutionPayloadV3: From<Engine::BuiltPayload> + PayloadEnvelopeExt,
AddOns::EthApi: EthApiSpec + EthTransactions + TraceExt + FullEthApiTypes,
{
let mut chain = Vec::with_capacity(length as usize);
for i in 0..length {