mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: relax EngineNodeLauncher bounds (#13540)
This commit is contained in:
@ -59,6 +59,7 @@ reth-tracing.workspace = true
|
||||
reth-transaction-pool.workspace = true
|
||||
|
||||
## ethereum
|
||||
alloy-consensus.workspace = true
|
||||
alloy-primitives.workspace = true
|
||||
alloy-rpc-types = { workspace = true, features = ["engine"] }
|
||||
alloy-eips = { workspace = true, features = ["kzg"] }
|
||||
|
||||
@ -25,10 +25,7 @@ use reth_evm::noop::NoopBlockExecutorProvider;
|
||||
use reth_fs_util as fs;
|
||||
use reth_invalid_block_hooks::InvalidBlockWitnessHook;
|
||||
use reth_network_p2p::headers::client::HeadersClient;
|
||||
use reth_node_api::{
|
||||
FullNodePrimitives, FullNodeTypes, NodePrimitives, NodeTypes, NodeTypesWithDB,
|
||||
NodeTypesWithDBAdapter,
|
||||
};
|
||||
use reth_node_api::{FullNodeTypes, NodeTypes, NodeTypesWithDB, NodeTypesWithDBAdapter};
|
||||
use reth_node_core::{
|
||||
args::InvalidBlockHookType,
|
||||
dirs::{ChainPath, DataDirPath},
|
||||
@ -46,7 +43,7 @@ use reth_node_metrics::{
|
||||
server::{MetricServer, MetricServerConfig},
|
||||
version::VersionInfo,
|
||||
};
|
||||
use reth_primitives::{Head, TransactionSigned};
|
||||
use reth_primitives::Head;
|
||||
use reth_provider::{
|
||||
providers::{NodeTypesForProvider, ProviderNodeTypes, StaticFileProvider},
|
||||
BlockHashReader, BlockNumReader, ChainSpecProvider, ProviderError, ProviderFactory,
|
||||
@ -388,7 +385,6 @@ where
|
||||
pub async fn create_provider_factory<N>(&self) -> eyre::Result<ProviderFactory<N>>
|
||||
where
|
||||
N: ProviderNodeTypes<DB = DB, ChainSpec = ChainSpec>,
|
||||
N::Primitives: FullNodePrimitives<BlockHeader = reth_primitives::Header>,
|
||||
{
|
||||
let factory = ProviderFactory::new(
|
||||
self.right().clone(),
|
||||
@ -455,7 +451,6 @@ where
|
||||
) -> eyre::Result<LaunchContextWith<Attached<WithConfigs<ChainSpec>, ProviderFactory<N>>>>
|
||||
where
|
||||
N: ProviderNodeTypes<DB = DB, ChainSpec = ChainSpec>,
|
||||
N::Primitives: FullNodePrimitives<BlockHeader = reth_primitives::Header>,
|
||||
{
|
||||
let factory = self.create_provider_factory().await?;
|
||||
let ctx = LaunchContextWith {
|
||||
@ -879,7 +874,7 @@ impl<T, CB>
|
||||
where
|
||||
T: FullNodeTypes<
|
||||
Provider: StateProviderFactory + ChainSpecProvider,
|
||||
Types: NodeTypesForProvider<Primitives: NodePrimitives<SignedTx = TransactionSigned>>,
|
||||
Types: NodeTypesForProvider,
|
||||
>,
|
||||
CB: NodeComponentsBuilder<T>,
|
||||
{
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
//! Engine node related functionality.
|
||||
|
||||
use alloy_consensus::BlockHeader;
|
||||
use futures::{future::Either, stream, stream_select, StreamExt};
|
||||
use reth_beacon_consensus::{
|
||||
hooks::{EngineHooks, StaticFileHook},
|
||||
@ -385,12 +386,12 @@ where
|
||||
ChainEvent::Handler(ev) => {
|
||||
if let Some(head) = ev.canonical_header() {
|
||||
let head_block = Head {
|
||||
number: head.number,
|
||||
number: head.number(),
|
||||
hash: head.hash(),
|
||||
difficulty: head.difficulty,
|
||||
timestamp: head.timestamp,
|
||||
difficulty: head.difficulty(),
|
||||
timestamp: head.timestamp(),
|
||||
total_difficulty: chainspec
|
||||
.final_paris_total_difficulty(head.number)
|
||||
.final_paris_total_difficulty(head.number())
|
||||
.unwrap_or_default(),
|
||||
};
|
||||
network_handle.update_status(head_block);
|
||||
|
||||
@ -26,7 +26,7 @@ pub struct ConsensusLayerHealthEvents<H = Header> {
|
||||
canon_chain: Box<dyn CanonChainTracker<Header = H>>,
|
||||
}
|
||||
|
||||
impl fmt::Debug for ConsensusLayerHealthEvents {
|
||||
impl<H> fmt::Debug for ConsensusLayerHealthEvents<H> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("ConsensusLayerHealthEvents").field("interval", &self.interval).finish()
|
||||
}
|
||||
@ -41,7 +41,7 @@ impl<H> ConsensusLayerHealthEvents<H> {
|
||||
}
|
||||
}
|
||||
|
||||
impl Stream for ConsensusLayerHealthEvents {
|
||||
impl<H: Send + Sync> Stream for ConsensusLayerHealthEvents<H> {
|
||||
type Item = ConsensusLayerHealthEvent;
|
||||
|
||||
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
|
||||
|
||||
Reference in New Issue
Block a user