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
359e6414
Commit
359e6414
authored
Jun 12, 2015
by
Bas van Kervel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed windows ipc path issue
parent
22080e1f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
4 deletions
+27
-4
main.go
cmd/console/main.go
+1
-1
main.go
cmd/geth/main.go
+2
-2
flags.go
cmd/utils/flags.go
+21
-1
path.go
common/path.go
+3
-0
No files found.
cmd/console/main.go
View file @
359e6414
...
@@ -93,7 +93,7 @@ func main() {
...
@@ -93,7 +93,7 @@ func main() {
func
run
(
ctx
*
cli
.
Context
)
{
func
run
(
ctx
*
cli
.
Context
)
{
jspath
:=
ctx
.
GlobalString
(
utils
.
JSpathFlag
.
Name
)
jspath
:=
ctx
.
GlobalString
(
utils
.
JSpathFlag
.
Name
)
ipcpath
:=
ctx
.
GlobalString
(
utils
.
IPCPathFlag
.
Name
)
ipcpath
:=
utils
.
IpcSocketPath
(
ctx
)
repl
:=
newJSRE
(
jspath
,
ipcpath
)
repl
:=
newJSRE
(
jspath
,
ipcpath
)
repl
.
welcome
(
ipcpath
)
repl
.
welcome
(
ipcpath
)
...
...
cmd/geth/main.go
View file @
359e6414
...
@@ -308,7 +308,7 @@ func console(ctx *cli.Context) {
...
@@ -308,7 +308,7 @@ func console(ctx *cli.Context) {
ethereum
,
ethereum
,
ctx
.
String
(
utils
.
JSpathFlag
.
Name
),
ctx
.
String
(
utils
.
JSpathFlag
.
Name
),
ctx
.
GlobalString
(
utils
.
RPCCORSDomainFlag
.
Name
),
ctx
.
GlobalString
(
utils
.
RPCCORSDomainFlag
.
Name
),
filepath
.
Join
(
ctx
.
GlobalString
(
utils
.
DataDirFlag
.
Name
),
"geth.ipc"
),
utils
.
IpcSocketPath
(
ctx
),
true
,
true
,
nil
,
nil
,
)
)
...
@@ -330,7 +330,7 @@ func execJSFiles(ctx *cli.Context) {
...
@@ -330,7 +330,7 @@ func execJSFiles(ctx *cli.Context) {
ethereum
,
ethereum
,
ctx
.
String
(
utils
.
JSpathFlag
.
Name
),
ctx
.
String
(
utils
.
JSpathFlag
.
Name
),
ctx
.
GlobalString
(
utils
.
RPCCORSDomainFlag
.
Name
),
ctx
.
GlobalString
(
utils
.
RPCCORSDomainFlag
.
Name
),
ctx
.
GlobalString
(
utils
.
IPCPathFlag
.
Name
),
utils
.
IpcSocketPath
(
ctx
),
false
,
false
,
nil
,
nil
,
)
)
...
...
cmd/utils/flags.go
View file @
359e6414
...
@@ -385,9 +385,29 @@ func MakeAccountManager(ctx *cli.Context) *accounts.Manager {
...
@@ -385,9 +385,29 @@ func MakeAccountManager(ctx *cli.Context) *accounts.Manager {
return
accounts
.
NewManager
(
ks
)
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
{
func
StartIPC
(
eth
*
eth
.
Ethereum
,
ctx
*
cli
.
Context
)
error
{
config
:=
comms
.
IpcConfig
{
config
:=
comms
.
IpcConfig
{
Endpoint
:
filepath
.
Join
(
ctx
.
GlobalString
(
DataDirFlag
.
Name
),
"geth.ipc"
),
Endpoint
:
IpcSocketPath
(
ctx
),
}
}
xeth
:=
xeth
.
New
(
eth
,
nil
)
xeth
:=
xeth
.
New
(
eth
,
nil
)
...
...
common/path.go
View file @
359e6414
...
@@ -95,6 +95,9 @@ func DefaultDataDir() string {
...
@@ -95,6 +95,9 @@ func DefaultDataDir() string {
}
}
func
DefaultIpcPath
()
string
{
func
DefaultIpcPath
()
string
{
if
runtime
.
GOOS
==
"windows"
{
return
`\\.\pipe\geth.ipc`
}
return
filepath
.
Join
(
DefaultDataDir
(),
"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