diff --git a/README.md b/README.md index c35269ba..4fbf7150 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ![image](https://github.com/user-attachments/assets/bf674eb1-512d-47e7-a9c5-e0d0e44c6edb) > [!Important] -> Tapedrive is very much still in development, it is **not deployed** to mainnet yet. +> Tapedrive is very much still in development, it is **not deployed** to mainnet yet. A [new version](https://x.com/zelimir__/status/1975304835064078660) is in the works. > > [Sign up](https://tapedrive.io/#sign-up) to receive updates on network milestones and product releases. Join us on [Discord](https://discord.gg/dVa9TWA45X) to engage with our devs. diff --git a/cli/src/cli.rs b/cli/src/cli.rs index 6861c99b..784b6fd0 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -101,10 +101,22 @@ pub enum Commands { #[arg(help = "Name of the miner you're mining with", conflicts_with = "pubkey", short = 'n', long = "name")] name: Option, + + #[arg(help = "Trusted peer to connect to", short = 'p', long = "peer")] + trusted_peer: Option, + + #[arg(help = "Miner account public key", short = 'm', long = "miner")] + miner_address: Option, }, Web { #[arg(help = "Port to run the web RPC service on")] port: Option, + + #[arg(help = "Trusted peer to connect to", short = 'p', long = "peer")] + trusted_peer: Option, + + #[arg(help = "Miner account public key", short = 'm', long = "miner")] + miner_address: Option, }, // Admin Commands diff --git a/cli/src/commands/network.rs b/cli/src/commands/network.rs index 2632609e..845dcc6d 100644 --- a/cli/src/commands/network.rs +++ b/cli/src/commands/network.rs @@ -21,14 +21,17 @@ pub async fn handle_network_commands(cli: Cli, context: Context) -> Result<()> { log::print_divider(); match cli.command { - Commands::Web { port } => { - handle_web(context, port).await?; + Commands::Web { port, trusted_peer, miner_address } => { + handle_archive(&context, trusted_peer, miner_address).await?; + handle_web(&context, port).await?; + } Commands::Archive { trusted_peer, miner_address } => { - handle_archive(context, trusted_peer, miner_address).await?; + handle_archive(&context, trusted_peer, miner_address).await?; } - Commands::Mine { pubkey, name } => { - handle_mine(context, pubkey, name).await?; + Commands::Mine { pubkey, name, trusted_peer, miner_address } => { + handle_archive(&context, trusted_peer, miner_address).await?; + handle_mine(&context, pubkey, name).await?; } Commands::Register { name } => { handle_register(context, name).await?; @@ -38,7 +41,7 @@ pub async fn handle_network_commands(cli: Cli, context: Context) -> Result<()> { Ok(()) } -pub async fn handle_web(context: Context, port: Option) -> Result<()> { +pub async fn handle_web(context: &Context, port: Option) -> Result<()> { let port = port.unwrap_or(3000); log::print_info("Starting web RPC service..."); @@ -49,7 +52,7 @@ pub async fn handle_web(context: Context, port: Option) -> Result<()> { } pub async fn handle_archive( - context: Context, + context: &Context, trusted_peer: Option, miner_address: Option ) -> Result<()> { @@ -82,7 +85,7 @@ pub async fn handle_archive( } pub async fn handle_mine( - context: Context, + context: &Context, miner_address: Option, miner_name: Option ) -> Result<()> {