feat(cli): more reasonable log output (#784)

This commit is contained in:
Bjerg
2023-01-11 11:53:33 +01:00
committed by GitHub
parent 16d506d21c
commit 2e87017686
13 changed files with 450 additions and 183 deletions

View File

@ -1,10 +1,14 @@
//! P2P Debugging tool
use crate::{
config::Config,
dirs::{ConfigPath, PlatformPath},
utils::{
chainspec::{chain_spec_value_parser, ChainSpecification},
hash_or_num_value_parser,
},
};
use backon::{ConstantBackoff, Retryable};
use clap::{Parser, Subcommand};
use reth_cli_utils::{
chainspec::{chain_spec_value_parser, ChainSpecification},
hash_or_num_value_parser,
};
use reth_db::mdbx::{Env, EnvKind, WriteMap};
use reth_interfaces::p2p::{
bodies::client::BodiesClient,
@ -14,14 +18,12 @@ use reth_network::FetchClient;
use reth_primitives::{BlockHashOrNumber, Header, NodeRecord, SealedHeader};
use std::sync::Arc;
use crate::{config::Config, dirs::ConfigPath};
/// `reth p2p` command
#[derive(Debug, Parser)]
pub struct Command {
/// The path to the configuration file to use.
#[arg(long, value_name = "FILE", verbatim_doc_comment, default_value_t)]
config: ConfigPath,
config: PlatformPath<ConfigPath>,
/// The chain this node is running.
///