mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
refactor: integrate BuiltPayload::Primitives (#13484)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -19,7 +19,7 @@ use reth_db_api::{
|
||||
database_metrics::{DatabaseMetadata, DatabaseMetrics},
|
||||
Database,
|
||||
};
|
||||
use reth_engine_primitives::EngineTypes;
|
||||
use reth_engine_primitives::{BuiltPayload, EngineTypes};
|
||||
use reth_trie_db::StateCommitment;
|
||||
|
||||
/// The type that configures the essential types of an Ethereum-like node.
|
||||
@ -41,7 +41,7 @@ pub trait NodeTypes: Send + Sync + Unpin + 'static {
|
||||
/// The type that configures an Ethereum-like node with an engine for consensus.
|
||||
pub trait NodeTypesWithEngine: NodeTypes {
|
||||
/// The node's engine types, defining the interaction with the consensus engine.
|
||||
type Engine: EngineTypes;
|
||||
type Engine: EngineTypes<BuiltPayload: BuiltPayload<Primitives = Self::Primitives>>;
|
||||
}
|
||||
|
||||
/// A helper trait that is downstream of the [`NodeTypesWithEngine`] trait and adds database to the
|
||||
@ -225,7 +225,7 @@ where
|
||||
impl<P, E, C, SC, S> NodeTypesWithEngine for AnyNodeTypesWithEngine<P, E, C, SC, S>
|
||||
where
|
||||
P: NodePrimitives + Send + Sync + Unpin + 'static,
|
||||
E: EngineTypes + Send + Sync + Unpin,
|
||||
E: EngineTypes<BuiltPayload: BuiltPayload<Primitives = P>> + Send + Sync + Unpin,
|
||||
C: EthChainSpec<Header = P::BlockHeader> + 'static,
|
||||
SC: StateCommitment,
|
||||
S: Default + Send + Sync + Unpin + Debug + 'static,
|
||||
|
||||
Reference in New Issue
Block a user