mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-25 23:29:58 -07:00
global: snapshot
This commit is contained in:
@@ -10,6 +10,10 @@ pub struct Config {
|
||||
#[arg(long, value_name = "DIR")]
|
||||
pub datadir: Option<String>,
|
||||
|
||||
/// Bitcoin RPC ip, default: localhost, saved
|
||||
#[arg(long, value_name = "IP")]
|
||||
pub rpcconnect: Option<String>,
|
||||
|
||||
/// Bitcoin RPC port, default: 8332, saved
|
||||
#[arg(long, value_name = "PORT")]
|
||||
pub rpcport: Option<u16>,
|
||||
@@ -42,6 +46,12 @@ impl Config {
|
||||
config_saved.datadir = Some(datadir);
|
||||
}
|
||||
|
||||
if let Some(rpcconnect) = config_args.rpcconnect {
|
||||
config_saved.rpcconnect = Some(rpcconnect);
|
||||
} else {
|
||||
config_saved.rpcconnect = Some("localhost".to_string())
|
||||
}
|
||||
|
||||
if let Some(rpcport) = config_args.rpcport {
|
||||
config_saved.rpcport = Some(rpcport);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user