Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
aaac1f0c
Commit
aaac1f0c
authored
Jun 12, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1254 from bas-vk/ipcwindowspathfix
Invalid named pipe name
parents
4bb9a610
55a796b7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
5 deletions
+26
-5
main.go
cmd/console/main.go
+1
-2
main.go
cmd/geth/main.go
+2
-2
flags.go
cmd/utils/flags.go
+20
-1
path.go
common/path.go
+3
-0
No files found.
cmd/console/main.go
View file @
aaac1f0c
...
...
@@ -52,7 +52,6 @@ func init() {
app
.
Action
=
run
app
.
Flags
=
[]
cli
.
Flag
{
utils
.
IPCDisabledFlag
,
utils
.
IPCPathFlag
,
utils
.
VerbosityFlag
,
utils
.
JSpathFlag
,
...
...
@@ -93,7 +92,7 @@ func main() {
func
run
(
ctx
*
cli
.
Context
)
{
jspath
:=
ctx
.
GlobalString
(
utils
.
JSpathFlag
.
Name
)
ipcpath
:=
ctx
.
GlobalString
(
utils
.
IPCPathFlag
.
Name
)
ipcpath
:=
utils
.
IpcSocketPath
(
ctx
)
repl
:=
newJSRE
(
jspath
,
ipcpath
)
repl
.
welcome
(
ipcpath
)
...
...
cmd/geth/main.go
View file @
aaac1f0c
...
...
@@ -308,7 +308,7 @@ func console(ctx *cli.Context) {
ethereum
,
ctx
.
String
(
utils
.
JSpathFlag
.
Name
),
ctx
.
GlobalString
(
utils
.
RPCCORSDomainFlag
.
Name
),
filepath
.
Join
(
ctx
.
GlobalString
(
utils
.
DataDirFlag
.
Name
),
"geth.ipc"
),
utils
.
IpcSocketPath
(
ctx
),
true
,
nil
,
)
...
...
@@ -330,7 +330,7 @@ func execJSFiles(ctx *cli.Context) {
ethereum
,
ctx
.
String
(
utils
.
JSpathFlag
.
Name
),
ctx
.
GlobalString
(
utils
.
RPCCORSDomainFlag
.
Name
),
ctx
.
GlobalString
(
utils
.
IPCPathFlag
.
Name
),
utils
.
IpcSocketPath
(
ctx
),
false
,
nil
,
)
...
...
cmd/utils/flags.go
View file @
aaac1f0c
...
...
@@ -385,9 +385,28 @@ func MakeAccountManager(ctx *cli.Context) *accounts.Manager {
return
accounts
.
NewManager
(
ks
)
}
func
IpcSocketPath
(
ctx
*
cli
.
Context
)
(
ipcpath
string
)
{
if
common
.
IsWindows
()
{
ipcpath
=
common
.
DefaultIpcPath
()
if
ipcpath
!=
ctx
.
GlobalString
(
IPCPathFlag
.
Name
)
{
ipcpath
=
ctx
.
GlobalString
(
IPCPathFlag
.
Name
)
}
}
else
{
ipcpath
=
common
.
DefaultIpcPath
()
if
ctx
.
GlobalString
(
IPCPathFlag
.
Name
)
!=
common
.
DefaultIpcPath
()
{
ipcpath
=
ctx
.
GlobalString
(
IPCPathFlag
.
Name
)
}
else
if
ctx
.
GlobalString
(
DataDirFlag
.
Name
)
!=
""
&&
ctx
.
GlobalString
(
DataDirFlag
.
Name
)
!=
common
.
DefaultDataDir
()
{
ipcpath
=
filepath
.
Join
(
ctx
.
GlobalString
(
DataDirFlag
.
Name
),
"geth.ipc"
)
}
}
return
}
func
StartIPC
(
eth
*
eth
.
Ethereum
,
ctx
*
cli
.
Context
)
error
{
config
:=
comms
.
IpcConfig
{
Endpoint
:
filepath
.
Join
(
ctx
.
GlobalString
(
DataDirFlag
.
Name
),
"geth.ipc"
),
Endpoint
:
IpcSocketPath
(
ctx
),
}
xeth
:=
xeth
.
New
(
eth
,
nil
)
...
...
common/path.go
View file @
aaac1f0c
...
...
@@ -95,6 +95,9 @@ func DefaultDataDir() string {
}
func
DefaultIpcPath
()
string
{
if
runtime
.
GOOS
==
"windows"
{
return
`\\.\pipe\geth.ipc`
}
return
filepath
.
Join
(
DefaultDataDir
(),
"geth.ipc"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment