mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat: implement clientVersionV1 in engine API (#8016)
This commit is contained in:
@ -39,7 +39,7 @@ reth-config.workspace = true
|
||||
reth-downloaders.workspace = true
|
||||
reth-node-events.workspace = true
|
||||
reth-consensus.workspace = true
|
||||
|
||||
reth-rpc-types.workspace = true
|
||||
## async
|
||||
futures.workspace = true
|
||||
tokio = { workspace = true, features = [
|
||||
|
||||
@ -25,11 +25,13 @@ use reth_node_core::{
|
||||
dirs::{ChainPath, DataDirPath},
|
||||
engine::EngineMessageStreamExt,
|
||||
exit::NodeExitFuture,
|
||||
version::{CARGO_PKG_VERSION, CLIENT_CODE, NAME_CLIENT, VERGEN_GIT_SHA},
|
||||
};
|
||||
use reth_node_events::{cl::ConsensusLayerHealthEvents, node};
|
||||
use reth_primitives::format_ether;
|
||||
use reth_provider::{providers::BlockchainProvider, CanonStateSubscriptions};
|
||||
use reth_rpc_engine_api::EngineApi;
|
||||
use reth_rpc_types::engine::ClientVersionV1;
|
||||
use reth_tasks::TaskExecutor;
|
||||
use reth_tracing::tracing::{debug, info};
|
||||
use reth_transaction_pool::TransactionPool;
|
||||
@ -407,12 +409,19 @@ where
|
||||
),
|
||||
);
|
||||
|
||||
let client = ClientVersionV1 {
|
||||
code: CLIENT_CODE,
|
||||
name: NAME_CLIENT.to_string(),
|
||||
version: CARGO_PKG_VERSION.to_string(),
|
||||
commit: VERGEN_GIT_SHA.to_string(),
|
||||
};
|
||||
let engine_api = EngineApi::new(
|
||||
blockchain_db.clone(),
|
||||
ctx.chain_spec(),
|
||||
beacon_engine_handle,
|
||||
node_adapter.components.payload_builder().clone().into(),
|
||||
Box::new(ctx.task_executor().clone()),
|
||||
client,
|
||||
);
|
||||
info!(target: "reth::cli", "Engine API handler initialized");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user