mirror of
https://github.com/Cuprate/cuprate.git
synced 2024-11-16 15:58:17 +00:00
fix clap
This commit is contained in:
parent
0d29b1c1dc
commit
3dc0049481
3 changed files with 18 additions and 2 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
@ -363,6 +363,7 @@ checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73"
|
|||
dependencies = [
|
||||
"anstyle",
|
||||
"clap_lex",
|
||||
"terminal_size",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2812,6 +2813,16 @@ dependencies = [
|
|||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "terminal_size"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7"
|
||||
dependencies = [
|
||||
"rustix",
|
||||
"windows-sys 0.48.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.63"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
name = "cuprated"
|
||||
version = "0.0.1"
|
||||
edition = "2021"
|
||||
description = "The Cuprate Monero Rust node."
|
||||
description = "The Cuprate Rust Monero node."
|
||||
license = "AGPL-3.0-only"
|
||||
authors = ["Boog900", "hinto-janai", "SyntheticBird45"]
|
||||
repository = "https://github.com/Cuprate/cuprate/tree/main/binaries/cuprated"
|
||||
|
@ -43,7 +43,7 @@ borsh = { workspace = true }
|
|||
bytemuck = { workspace = true }
|
||||
bytes = { workspace = true }
|
||||
cfg-if = { workspace = true }
|
||||
clap = { workspace = true, features = ["cargo"] }
|
||||
clap = { workspace = true, features = ["cargo", "help", "wrap_help"] }
|
||||
chrono = { workspace = true }
|
||||
crypto-bigint = { workspace = true }
|
||||
crossbeam = { workspace = true }
|
||||
|
|
|
@ -6,7 +6,9 @@ use cuprate_helper::network::Network;
|
|||
|
||||
use crate::config::{default::create_default_config_file, Config, DEFAULT_CONFIG_FILE_NAME};
|
||||
|
||||
/// Cuprate Args.
|
||||
#[derive(clap::Parser, Debug)]
|
||||
#[command(version, about)]
|
||||
pub struct Args {
|
||||
/// The network we should run on.
|
||||
#[arg(
|
||||
|
@ -17,10 +19,13 @@ pub struct Args {
|
|||
)]
|
||||
pub network: Network,
|
||||
/// The amount of outbound clear-net connections to maintain.
|
||||
#[arg(long)]
|
||||
pub outbound_connections: Option<usize>,
|
||||
/// The location of the Cuprate config file.
|
||||
#[arg(long)]
|
||||
pub config_file: Option<PathBuf>,
|
||||
/// Generate a config file and place it in the given folder.
|
||||
#[arg(long)]
|
||||
pub generate_config: Option<PathBuf>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue