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
529897ea
Commit
529897ea
authored
Apr 14, 2016
by
Bas van Kervel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/utils: strip excessive whitespace from api command line arguments
parent
e50e3bea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
flags.go
cmd/utils/flags.go
+12
-2
No files found.
cmd/utils/flags.go
View file @
529897ea
...
...
@@ -500,6 +500,16 @@ func MakeNAT(ctx *cli.Context) nat.Interface {
return
natif
}
// MakeRPCModules splits input separated by a comma and trims excessive white
// space from the substrings.
func
MakeRPCModules
(
input
string
)
[]
string
{
result
:=
strings
.
Split
(
input
,
","
)
for
i
,
r
:=
range
result
{
result
[
i
]
=
strings
.
TrimSpace
(
r
)
}
return
result
}
// MakeHTTPRpcHost creates the HTTP RPC listener interface string from the set
// command line flags, returning empty if the HTTP endpoint is disabled.
func
MakeHTTPRpcHost
(
ctx
*
cli
.
Context
)
string
{
...
...
@@ -652,11 +662,11 @@ func MakeSystemNode(name, version string, extra []byte, ctx *cli.Context) *node.
HTTPHost
:
MakeHTTPRpcHost
(
ctx
),
HTTPPort
:
ctx
.
GlobalInt
(
RPCPortFlag
.
Name
),
HTTPCors
:
ctx
.
GlobalString
(
RPCCORSDomainFlag
.
Name
),
HTTPModules
:
strings
.
Split
(
ctx
.
GlobalString
(
RPCApiFlag
.
Name
),
","
),
HTTPModules
:
MakeRPCModules
(
ctx
.
GlobalString
(
RPCApiFlag
.
Name
)
),
WSHost
:
MakeWSRpcHost
(
ctx
),
WSPort
:
ctx
.
GlobalInt
(
WSPortFlag
.
Name
),
WSOrigins
:
ctx
.
GlobalString
(
WSAllowedOriginsFlag
.
Name
),
WSModules
:
strings
.
Split
(
ctx
.
GlobalString
(
WSApiFlag
.
Name
),
","
),
WSModules
:
MakeRPCModules
(
ctx
.
GlobalString
(
WSApiFlag
.
Name
)
),
}
// Configure the Ethereum service
accman
:=
MakeAccountManager
(
ctx
)
...
...
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