mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-27 08:08:15 -05:00
feat: use alloy_network::Network::BlockResponse instead of reth_rpc_types::Block in RPC (#10613)
This commit is contained in:
@@ -20,7 +20,10 @@ pub trait EthApiTypes: Send + Sync + Clone {
|
||||
+ Sync;
|
||||
/// Blockchain primitive types, specific to network, e.g. block and transaction.
|
||||
// todo: remove restriction `reth_rpc_types::Transaction`
|
||||
type NetworkTypes: Network<TransactionResponse = WithOtherFields<Transaction>>;
|
||||
type NetworkTypes: Network<
|
||||
TransactionResponse = WithOtherFields<Transaction>,
|
||||
HeaderResponse = reth_rpc_types::Header,
|
||||
>;
|
||||
}
|
||||
|
||||
impl EthApiTypes for () {
|
||||
@@ -32,4 +35,4 @@ impl EthApiTypes for () {
|
||||
pub type RpcTransaction<T> = <T as Network>::TransactionResponse;
|
||||
|
||||
/// Adapter for network specific block type.
|
||||
pub type RpcBlock<T> = Block<RpcTransaction<T>>;
|
||||
pub type RpcBlock<T> = Block<RpcTransaction<T>, <T as Network>::HeaderResponse>;
|
||||
|
||||
Reference in New Issue
Block a user