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 => {
let server_address = match self.params.server_address {
Some(address) => address,
None => "127.0.0.1:3456".parse()?,
};
// Default to 127.0.0.1:1234
let server_address = self.params.server_address.unwrap_or("127.0.0.1:1234".parse().unwrap());
let (_, server_handle) =
rpc::run_server(server_address, Arc::clone(&context)).await?;

View File

@ -136,7 +136,10 @@ where
monero,
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(
Some(bitcoin),