mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-03 11:34:57 -05:00
28 lines
755 B
Rust
28 lines
755 B
Rust
use reth_network::NetworkPrimitives;
|
|
use reth_node_api::BlockBody;
|
|
use reth_provider::BlockReader;
|
|
|
|
/// This is a type alias to make type bounds simpler, when we have a [`NetworkPrimitives`] and need
|
|
/// a [`BlockReader`] whose associated types match the [`NetworkPrimitives`] associated types.
|
|
pub trait BlockReaderFor<N: NetworkPrimitives>:
|
|
BlockReader<
|
|
Block = N::Block,
|
|
Header = N::BlockHeader,
|
|
Transaction = <N::BlockBody as BlockBody>::Transaction,
|
|
Receipt = N::Receipt,
|
|
>
|
|
{
|
|
}
|
|
|
|
impl<N, T> BlockReaderFor<N> for T
|
|
where
|
|
N: NetworkPrimitives,
|
|
T: BlockReader<
|
|
Block = N::Block,
|
|
Header = N::BlockHeader,
|
|
Transaction = <N::BlockBody as BlockBody>::Transaction,
|
|
Receipt = N::Receipt,
|
|
>,
|
|
{
|
|
}
|