You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Err(format!("RPC address {} is already in use, make sure that another instance of a CodeChain node is not running or change the address using the --jsonrpc-port option.", url))
65
45
},
66
46
Err(e) => Err(format!("RPC error: {:?}", e)),
67
-
Ok(server) => Ok(server),
47
+
Ok(server) => {
48
+
cinfo!(RPC,"RPC Listening on {}", url);
49
+
ifletSome(hosts) = config.hosts{
50
+
cinfo!(RPC,"Allowed hosts are {:?}", hosts);
51
+
}
52
+
ifletSome(cors) = config.cors{
53
+
cinfo!(RPC,"CORS domains are {:?}", cors);
54
+
}
55
+
Ok(server)
56
+
},
68
57
}
69
58
}
70
59
@@ -74,19 +63,17 @@ pub struct RpcIpcConfig {
74
63
}
75
64
76
65
pubfnrpc_ipc_start(
77
-
cfg:&RpcIpcConfig,
78
-
enable_devel_api:bool,
79
-
deps:&rpc_apis::ApiDependencies,
66
+
server:MetaIoHandler<(),implMiddleware<()>>,
67
+
config:RpcIpcConfig,
80
68
) -> Result<IpcServer,String>{
81
-
let server = setup_rpc_server(enable_devel_api, deps);
82
-
let start_result = start_ipc(&cfg.socket_addr, server);
69
+
let start_result = start_ipc(&config.socket_addr, server);
Err(format!("IPC address {} is already in use, make sure that another instance of a Codechain node is not running or change the address using the --ipc-path options.",cfg.socket_addr))
72
+
Err(format!("IPC address {} is already in use, make sure that another instance of a Codechain node is not running or change the address using the --ipc-path options.",config.socket_addr))
86
73
},
87
74
Err(e) => Err(format!("IPC error: {:?}", e)),
88
75
Ok(server) => {
89
-
cinfo!(RPC,"IPC Listening on {}",cfg.socket_addr);
76
+
cinfo!(RPC,"IPC Listening on {}",config.socket_addr);
90
77
Ok(server)
91
78
},
92
79
}
@@ -99,15 +86,10 @@ pub struct RpcWsConfig {
99
86
pubmax_connections:usize,
100
87
}
101
88
102
-
pubfnrpc_ws_start(
103
-
cfg:&RpcWsConfig,
104
-
enable_devel_api:bool,
105
-
deps:&rpc_apis::ApiDependencies,
106
-
) -> Result<WsServer,String>{
107
-
let server = setup_rpc_server(enable_devel_api, deps);
108
-
let url = format!("{}:{}", cfg.interface, cfg.port);
Err(format!("WebSockets address {} is already in use, make sure that another instance of a Codechain node is not running or change the address using the --ws-port options.", addr))
0 commit comments