refactor: move cli utils to new reth-cli-utils crate (#790)

* Move bin/src/util to reth-cli-utils

* Add reth-cli-utils to workspace members

* Fix imports in bin/src

* Create reth-cli-utils crate

* Add utils import
This commit is contained in:
David Kulman
2023-01-10 01:13:41 +01:00
committed by GitHub
parent 7c9c2fea50
commit 515590faa8
14 changed files with 87 additions and 38 deletions

View File

@ -1,6 +1,10 @@
//! P2P Debugging tool
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,
@ -10,14 +14,7 @@ use reth_network::FetchClient;
use reth_primitives::{BlockHashOrNumber, Header, NodeRecord, SealedHeader};
use std::sync::Arc;
use crate::{
config::Config,
dirs::ConfigPath,
util::{
chainspec::{chain_spec_value_parser, ChainSpecification},
hash_or_num_value_parser,
},
};
use crate::{config::Config, dirs::ConfigPath};
/// `reth p2p` command
#[derive(Debug, Parser)]