chore(sdk): Add NodePrimitives::Receipt (#12357)

This commit is contained in:
Emilia Hane
2024-11-07 10:59:17 +01:00
committed by GitHub
parent 29a9e97797
commit d31e1d601d
3 changed files with 7 additions and 2 deletions

View File

@ -26,7 +26,7 @@ use reth_node_builder::{
BuilderContext, Node, NodeAdapter, NodeComponentsBuilder, PayloadBuilderConfig, PayloadTypes, BuilderContext, Node, NodeAdapter, NodeComponentsBuilder, PayloadBuilderConfig, PayloadTypes,
}; };
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService}; use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
use reth_primitives::{Block, Header}; use reth_primitives::{Block, Header, Receipt};
use reth_provider::CanonStateSubscriptions; use reth_provider::CanonStateSubscriptions;
use reth_rpc::EthApi; use reth_rpc::EthApi;
use reth_tracing::tracing::{debug, info}; use reth_tracing::tracing::{debug, info};
@ -44,6 +44,7 @@ pub struct EthPrimitives;
impl NodePrimitives for EthPrimitives { impl NodePrimitives for EthPrimitives {
type Block = Block; type Block = Block;
type Receipt = Receipt;
} }
/// Type configuration for a regular Ethereum node. /// Type configuration for a regular Ethereum node.

View File

@ -24,10 +24,13 @@ use reth_trie_db::StateCommitment;
pub trait NodePrimitives { pub trait NodePrimitives {
/// Block primitive. /// Block primitive.
type Block; type Block;
/// A receipt.
type Receipt;
} }
impl NodePrimitives for () { impl NodePrimitives for () {
type Block = reth_primitives::Block; type Block = reth_primitives::Block;
type Receipt = ();
} }
/// The type that configures the essential types of an Ethereum-like node. /// The type that configures the essential types of an Ethereum-like node.

View File

@ -24,7 +24,7 @@ use reth_optimism_evm::{OpEvmConfig, OpExecutionStrategyFactory};
use reth_optimism_payload_builder::builder::OpPayloadTransactions; use reth_optimism_payload_builder::builder::OpPayloadTransactions;
use reth_optimism_rpc::OpEthApi; use reth_optimism_rpc::OpEthApi;
use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService}; use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService};
use reth_primitives::{Block, Header}; use reth_primitives::{Block, Header, Receipt};
use reth_provider::CanonStateSubscriptions; use reth_provider::CanonStateSubscriptions;
use reth_tracing::tracing::{debug, info}; use reth_tracing::tracing::{debug, info};
use reth_transaction_pool::{ use reth_transaction_pool::{
@ -46,6 +46,7 @@ pub struct OpPrimitives;
impl NodePrimitives for OpPrimitives { impl NodePrimitives for OpPrimitives {
type Block = Block; type Block = Block;
type Receipt = Receipt;
} }
/// Type configuration for a regular Optimism node. /// Type configuration for a regular Optimism node.