mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
feat: add --p2p-secret-key-hex which is similiar nodekeyhex in geth (#19670)
Co-authored-by: weixie.cui <weixie.cui@okg.com>
This commit is contained in:
@@ -12,7 +12,6 @@ use crate::{
|
||||
use alloy_eips::eip4844::env_settings::EnvKzgSettings;
|
||||
use futures::Future;
|
||||
use reth_chainspec::{EthChainSpec, EthereumHardforks, Hardforks};
|
||||
use reth_cli_util::get_secret_key;
|
||||
use reth_db_api::{database::Database, database_metrics::DatabaseMetrics};
|
||||
use reth_exex::ExExContext;
|
||||
use reth_network::{
|
||||
@@ -869,9 +868,7 @@ impl<Node: FullNodeTypes> BuilderContext<Node> {
|
||||
|
||||
/// Get the network secret from the given data dir
|
||||
fn network_secret(&self, data_dir: &ChainPath<DataDirPath>) -> eyre::Result<SecretKey> {
|
||||
let network_secret_path =
|
||||
self.config().network.p2p_secret_key.clone().unwrap_or_else(|| data_dir.p2p_secret());
|
||||
let secret_key = get_secret_key(&network_secret_path)?;
|
||||
let secret_key = self.config().network.secret_key(data_dir.p2p_secret())?;
|
||||
Ok(secret_key)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user