From 82fc7a5f1d16705e3327b6fdd9411fb518bb29d0 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 22 Oct 2024 18:45:16 +0200 Subject: [PATCH] chore: log enode --- Cargo.lock | 1 + crates/node/Cargo.toml | 2 +- crates/node/src/node.rs | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index af498dc..18c0649 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4554,6 +4554,7 @@ dependencies = [ "reth-revm", "reth-transaction-pool", "serde_json", + "tracing", ] [[package]] diff --git a/crates/node/Cargo.toml b/crates/node/Cargo.toml index ec49b08..da6ebd7 100644 --- a/crates/node/Cargo.toml +++ b/crates/node/Cargo.toml @@ -29,7 +29,7 @@ reth-network-types.workspace = true alloy-primitives.workspace = true serde_json.workspace = true - +tracing.workspace = true eyre.workspace = true [lints] diff --git a/crates/node/src/node.rs b/crates/node/src/node.rs index d72ffc0..8f089fa 100644 --- a/crates/node/src/node.rs +++ b/crates/node/src/node.rs @@ -7,7 +7,7 @@ use crate::evm::OdysseyEvmConfig; use reth_evm::execute::BasicBlockExecutorProvider; use reth_network::{ transactions::{TransactionPropagationMode, TransactionsManagerConfig}, - NetworkHandle, NetworkManager, + NetworkHandle, NetworkManager, PeersInfo, }; use reth_network_types::ReputationChangeWeights; use reth_node_api::{FullNodeTypes, NodeTypesWithEngine}; @@ -30,6 +30,7 @@ use reth_optimism_node::{ use reth_payload_builder::PayloadBuilderHandle; use reth_transaction_pool::{SubPoolLimit, TransactionPool, TXPOOL_MAX_ACCOUNT_SLOTS_PER_SENDER}; use std::time::Duration; +use tracing::info; /// Type configuration for a regular Odyssey node. #[derive(Debug, Clone, Default)] @@ -217,7 +218,7 @@ where }; let network = NetworkManager::builder(network_config).await?; let handle = ctx.start_network_with(network, pool, txconfig); - + info!(target: "reth::cli", enode=%handle.local_node_record(), "P2P networking initialized"); Ok(handle) } }