File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77use crate :: { AccordantBlockchain , ArbitratingBlockchain , Error } ;
88use farcaster_core:: blockchain:: Network ;
99use internet2:: addr:: InetSocketAddr ;
10- use std:: fs:: File ;
1110use std:: io:: prelude:: * ;
1211use std:: path:: Path ;
1312use std:: str:: FromStr ;
13+ use std:: { fs:: File , net:: SocketAddr } ;
1414
1515use serde:: { Deserialize , Serialize } ;
1616
@@ -141,15 +141,15 @@ impl Config {
141141
142142 /// Returns the addr of the tor control socket if it is set, or the default
143143 /// socket at localhost:9051 if not.
144- pub fn get_tor_control_socket ( & self ) -> Result < InetSocketAddr , Error > {
144+ pub fn get_tor_control_socket ( & self ) -> Result < SocketAddr , Error > {
145145 if let Some ( FarcasterdConfig {
146146 tor_control_socket : Some ( addr) ,
147147 ..
148148 } ) = & self . farcasterd
149149 {
150- Ok ( InetSocketAddr :: from_str ( addr) ?)
150+ Ok ( SocketAddr :: from_str ( addr) ?)
151151 } else {
152- Ok ( InetSocketAddr :: from_str ( "127.0.0.1:9051" ) ?)
152+ Ok ( SocketAddr :: from_str ( "127.0.0.1:9051" ) ?)
153153 }
154154 }
155155
Original file line number Diff line number Diff line change @@ -139,6 +139,11 @@ pub enum Error {
139139 #[ from]
140140 Inet2AddrParseError ( internet2:: addr:: AddrParseError ) ,
141141
142+ /// Net socket address parsing errors
143+ #[ display( inner) ]
144+ #[ from]
145+ SocketAddrError ( std:: net:: AddrParseError ) ,
146+
142147 /// Tonic gRPC deamon transport errors
143148 #[ display( inner) ]
144149 #[ from]
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use crate::bus::HiddenServiceInfo;
1212pub fn create_v3_onion_service (
1313 bind_addr : InetSocketAddr ,
1414 public_port : u16 ,
15- control_addr : InetSocketAddr ,
15+ control_addr : SocketAddr ,
1616 existing_hidden_services : & Vec < HiddenServiceInfo > ,
1717) -> Result < OnionAddressV3 , ConnError > {
1818 use tokio:: runtime:: Builder ;
You can’t perform that action at this time.
0 commit comments