mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
bin/tau: add default value for rpc_listen
This commit is contained in:
@@ -168,7 +168,10 @@ async fn main() -> Result<()> {
|
||||
|
||||
spawn_config(&config_path, CONFIG_FILE_CONTENTS)?;
|
||||
|
||||
let config: TauConfig = Config::<TauConfig>::load(config_path)?;
|
||||
let config: TauConfig = match Config::<TauConfig>::load(config_path) {
|
||||
Ok(c) => c,
|
||||
Err(_) => TauConfig::default(),
|
||||
};
|
||||
|
||||
start(args, config).await
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::{
|
||||
env::{temp_dir, var},
|
||||
fs::{self, File},
|
||||
io::{self, Read, Write},
|
||||
net::SocketAddr,
|
||||
net::{IpAddr, Ipv4Addr, SocketAddr},
|
||||
ops::Index,
|
||||
process::Command,
|
||||
};
|
||||
@@ -24,6 +24,12 @@ pub struct TauConfig {
|
||||
pub rpc_listen: SocketAddr,
|
||||
}
|
||||
|
||||
impl Default for TauConfig {
|
||||
fn default() -> Self {
|
||||
Self { rpc_listen: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 11055) }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum CliTauSubCommands {
|
||||
/// Add a new task
|
||||
|
||||
Reference in New Issue
Block a user