File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 7
7
use crate :: { AccordantBlockchain , ArbitratingBlockchain , Error } ;
8
8
use farcaster_core:: blockchain:: Network ;
9
9
use internet2:: addr:: InetSocketAddr ;
10
- use std:: fs:: File ;
11
10
use std:: io:: prelude:: * ;
12
11
use std:: path:: Path ;
13
12
use std:: str:: FromStr ;
13
+ use std:: { fs:: File , net:: SocketAddr } ;
14
14
15
15
use serde:: { Deserialize , Serialize } ;
16
16
@@ -141,15 +141,15 @@ impl Config {
141
141
142
142
/// Returns the addr of the tor control socket if it is set, or the default
143
143
/// 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 > {
145
145
if let Some ( FarcasterdConfig {
146
146
tor_control_socket : Some ( addr) ,
147
147
..
148
148
} ) = & self . farcasterd
149
149
{
150
- Ok ( InetSocketAddr :: from_str ( addr) ?)
150
+ Ok ( SocketAddr :: from_str ( addr) ?)
151
151
} else {
152
- Ok ( InetSocketAddr :: from_str ( "127.0.0.1:9051" ) ?)
152
+ Ok ( SocketAddr :: from_str ( "127.0.0.1:9051" ) ?)
153
153
}
154
154
}
155
155
Original file line number Diff line number Diff line change @@ -139,6 +139,11 @@ pub enum Error {
139
139
#[ from]
140
140
Inet2AddrParseError ( internet2:: addr:: AddrParseError ) ,
141
141
142
+ /// Net socket address parsing errors
143
+ #[ display( inner) ]
144
+ #[ from]
145
+ SocketAddrError ( std:: net:: AddrParseError ) ,
146
+
142
147
/// Tonic gRPC deamon transport errors
143
148
#[ display( inner) ]
144
149
#[ from]
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use crate::bus::HiddenServiceInfo;
12
12
pub fn create_v3_onion_service (
13
13
bind_addr : InetSocketAddr ,
14
14
public_port : u16 ,
15
- control_addr : InetSocketAddr ,
15
+ control_addr : SocketAddr ,
16
16
existing_hidden_services : & Vec < HiddenServiceInfo > ,
17
17
) -> Result < OnionAddressV3 , ConnError > {
18
18
use tokio:: runtime:: Builder ;
You can’t perform that action at this time.
0 commit comments