Pass server_address properly to RpcServer

This commit is contained in:
binarybaron 2023-08-09 22:49:13 +02:00
parent 186b242db5
commit 96cc194b46
2 changed files with 6 additions and 5 deletions

View File

@ -331,10 +331,8 @@ impl Request {
})) }))
} }
Method::StartDaemon => { Method::StartDaemon => {
let server_address = match self.params.server_address { // Default to 127.0.0.1:1234
Some(address) => address, let server_address = self.params.server_address.unwrap_or("127.0.0.1:1234".parse().unwrap());
None => "127.0.0.1:3456".parse()?,
};
let (_, server_handle) = let (_, server_handle) =
rpc::run_server(server_address, Arc::clone(&context)).await?; rpc::run_server(server_address, Arc::clone(&context)).await?;

View File

@ -136,7 +136,10 @@ where
monero, monero,
tor, tor,
} => { } => {
let request = Request::new(rx.subscribe(), Method::StartDaemon, Params::default()); let request = Request::new(rx.subscribe(), Method::StartDaemon, Params {
server_address,
..Default::default()
});
let context = Context::build( let context = Context::build(
Some(bitcoin), Some(bitcoin),