@@ -96,12 +96,6 @@ type Config struct {
96
96
// USB enables hardware wallet monitoring and connectivity.
97
97
USB bool `toml:",omitempty"`
98
98
99
- // IPCPath is the requested location to place the IPC endpoint. If the path is
100
- // a simple file name, it is placed inside the data directory (or on the root
101
- // pipe path on Windows), whereas if it's a resolvable path name (absolute or
102
- // relative), then that specific path is enforced. An empty path disables IPC.
103
- IPCPath string
104
-
105
99
// HTTPHost is the host interface on which to start the HTTP RPC server. If this
106
100
// field is empty, no HTTP API endpoint will be started.
107
101
HTTPHost string
@@ -177,31 +171,6 @@ type Config struct {
177
171
AllowUnprotectedTxs bool `toml:",omitempty"`
178
172
}
179
173
180
- // IPCEndpoint resolves an IPC endpoint based on a configured value, taking into
181
- // account the set data folders as well as the designated platform we're currently
182
- // running on.
183
- func (c * Config ) IPCEndpoint () string {
184
- // Short circuit if IPC has not been enabled
185
- if c .IPCPath == "" {
186
- return ""
187
- }
188
- // On windows we can only use plain top-level pipes
189
- if runtime .GOOS == "windows" {
190
- if strings .HasPrefix (c .IPCPath , `\\.\pipe\` ) {
191
- return c .IPCPath
192
- }
193
- return `\\.\pipe\` + c .IPCPath
194
- }
195
- // Resolve names into the data directory full paths otherwise
196
- if filepath .Base (c .IPCPath ) == c .IPCPath {
197
- if c .DataDir == "" {
198
- return filepath .Join (os .TempDir (), c .IPCPath )
199
- }
200
- return filepath .Join (c .DataDir , c .IPCPath )
201
- }
202
- return c .IPCPath
203
- }
204
-
205
174
// NodeDB returns the path to the discovery node database.
206
175
func (c * Config ) NodeDB () string {
207
176
if c .DataDir == "" {
@@ -210,18 +179,6 @@ func (c *Config) NodeDB() string {
210
179
return c .ResolvePath (datadirNodeDatabase )
211
180
}
212
181
213
- // DefaultIPCEndpoint returns the IPC path used by default.
214
- func DefaultIPCEndpoint (clientIdentifier string ) string {
215
- if clientIdentifier == "" {
216
- clientIdentifier = strings .TrimSuffix (filepath .Base (os .Args [0 ]), ".exe" )
217
- if clientIdentifier == "" {
218
- panic ("empty executable name" )
219
- }
220
- }
221
- config := & Config {DataDir : DefaultDataDir (), IPCPath : clientIdentifier + ".ipc" }
222
- return config .IPCEndpoint ()
223
- }
224
-
225
182
// HTTPEndpoint resolves an HTTP endpoint based on the configured host interface
226
183
// and port parameters.
227
184
func (c * Config ) HTTPEndpoint () string {
0 commit comments