feat: add Receipt AT to ReceiptProvider (#12890)

This commit is contained in:
Arsenii Kulikov
2024-11-27 18:02:25 +04:00
committed by GitHub
parent b62929c390
commit 533b555f87
37 changed files with 267 additions and 143 deletions

View File

@ -147,7 +147,11 @@ where
impl<C> NetworkConfig<C>
where
C: BlockReader<Block = reth_primitives::Block> + HeaderProvider + Clone + Unpin + 'static,
C: BlockReader<Block = reth_primitives::Block, Receipt = reth_primitives::Receipt>
+ HeaderProvider
+ Clone
+ Unpin
+ 'static,
{
/// Starts the networking stack given a [`NetworkConfig`] and returns a handle to the network.
pub async fn start_network(self) -> Result<NetworkHandle, NetworkError> {

View File

@ -80,7 +80,7 @@ impl<C, N: NetworkPrimitives> EthRequestHandler<C, N> {
impl<C> EthRequestHandler<C>
where
C: BlockReader + HeaderProvider + ReceiptProvider,
C: BlockReader + HeaderProvider + ReceiptProvider<Receipt = reth_primitives::Receipt>,
{
/// Returns the list of requested headers
fn get_headers_response(&self, request: GetBlockHeaders) -> Vec<Header> {
@ -224,7 +224,9 @@ where
/// This should be spawned or used as part of `tokio::select!`.
impl<C> Future for EthRequestHandler<C>
where
C: BlockReader<Block = reth_primitives::Block> + HeaderProvider + Unpin,
C: BlockReader<Block = reth_primitives::Block, Receipt = reth_primitives::Receipt>
+ HeaderProvider
+ Unpin,
{
type Output = ();

View File

@ -194,7 +194,11 @@ where
impl<C, Pool> Testnet<C, Pool>
where
C: BlockReader<Block = reth_primitives::Block> + HeaderProvider + Clone + Unpin + 'static,
C: BlockReader<Block = reth_primitives::Block, Receipt = reth_primitives::Receipt>
+ HeaderProvider
+ Clone
+ Unpin
+ 'static,
Pool: TransactionPool + Unpin + 'static,
{
/// Spawns the testnet to a separate task
@ -253,7 +257,10 @@ impl<C, Pool> fmt::Debug for Testnet<C, Pool> {
impl<C, Pool> Future for Testnet<C, Pool>
where
C: BlockReader<Block = reth_primitives::Block> + HeaderProvider + Unpin + 'static,
C: BlockReader<Block = reth_primitives::Block, Receipt = reth_primitives::Receipt>
+ HeaderProvider
+ Unpin
+ 'static,
Pool: TransactionPool + Unpin + 'static,
{
type Output = ();
@ -448,7 +455,10 @@ where
impl<C, Pool> Future for Peer<C, Pool>
where
C: BlockReader<Block = reth_primitives::Block> + HeaderProvider + Unpin + 'static,
C: BlockReader<Block = reth_primitives::Block, Receipt = reth_primitives::Receipt>
+ HeaderProvider
+ Unpin
+ 'static,
Pool: TransactionPool + Unpin + 'static,
{
type Output = ();