mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
fix(cmd-p2p): split off create_db from init_db (#7265)
This commit is contained in:
@@ -12,7 +12,7 @@ use crate::{
|
||||
use backon::{ConstantBuilder, Retryable};
|
||||
use clap::{Parser, Subcommand};
|
||||
use reth_config::Config;
|
||||
use reth_db::open_db;
|
||||
use reth_db::create_db;
|
||||
use reth_discv4::NatResolver;
|
||||
use reth_interfaces::p2p::bodies::client::BodiesClient;
|
||||
use reth_primitives::{BlockHashOrNumber, ChainSpec, NodeRecord};
|
||||
@@ -100,7 +100,7 @@ impl Command {
|
||||
/// Execute `p2p` command
|
||||
pub async fn execute(&self) -> eyre::Result<()> {
|
||||
let tempdir = tempfile::TempDir::new()?;
|
||||
let noop_db = Arc::new(open_db(&tempdir.into_path(), self.db.database_args())?);
|
||||
let noop_db = Arc::new(create_db(tempdir.into_path(), self.db.database_args())?);
|
||||
|
||||
// add network name to data dir
|
||||
let data_dir = self.datadir.unwrap_or_chain_default(self.chain.chain);
|
||||
|
||||
Reference in New Issue
Block a user