@@ -41,6 +41,7 @@ pub struct Config {
4141 pub electrum_rpc_addr : SocketAddr ,
4242 pub http_addr : SocketAddr ,
4343 pub http_socket_file : Option < PathBuf > ,
44+ pub rpc_socket_file : Option < PathBuf > ,
4445 pub monitoring_addr : SocketAddr ,
4546 pub jsonrpc_import : bool ,
4647 pub light_mode : bool ,
@@ -243,6 +244,14 @@ impl Config {
243244 . takes_value ( true ) ,
244245 ) ;
245246
247+ #[ cfg( unix) ]
248+ let args = args. arg (
249+ Arg :: with_name ( "rpc_socket_file" )
250+ . long ( "rpc-socket-file" )
251+ . help ( "Electrum RPC 'unix socket file' to listen on (default disabled, enabling this ignores the electrum_rpc_addr arg)" )
252+ . takes_value ( true ) ,
253+ ) ;
254+
246255 #[ cfg( feature = "liquid" ) ]
247256 let args = args
248257 . arg (
@@ -384,6 +393,7 @@ impl Config {
384393 ) ;
385394
386395 let http_socket_file: Option < PathBuf > = m. value_of ( "http_socket_file" ) . map ( PathBuf :: from) ;
396+ let rpc_socket_file: Option < PathBuf > = m. value_of ( "rpc_socket_file" ) . map ( PathBuf :: from) ;
387397 let monitoring_addr: SocketAddr = str_to_socketaddr (
388398 m. value_of ( "monitoring_addr" )
389399 . unwrap_or ( & format ! ( "127.0.0.1:{}" , default_monitoring_port) ) ,
@@ -452,6 +462,7 @@ impl Config {
452462 electrum_banner,
453463 http_addr,
454464 http_socket_file,
465+ rpc_socket_file,
455466 monitoring_addr,
456467 mempool_backlog_stats_ttl : value_t_or_exit ! ( m, "mempool_backlog_stats_ttl" , u64 ) ,
457468 mempool_recent_txs_size : value_t_or_exit ! ( m, "mempool_recent_txs_size" , usize ) ,
0 commit comments