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
6d8e51ab
Unverified
Commit
6d8e51ab
authored
Jul 06, 2020
by
gary rong
Committed by
GitHub
Jul 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd, node: dump empty value config (#21296)
parent
6315b6fc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
flags.go
cmd/utils/flags.go
+8
-5
config.go
node/config.go
+6
-6
No files found.
cmd/utils/flags.go
View file @
6d8e51ab
...
@@ -905,12 +905,15 @@ func setNAT(ctx *cli.Context, cfg *p2p.Config) {
...
@@ -905,12 +905,15 @@ func setNAT(ctx *cli.Context, cfg *p2p.Config) {
// splitAndTrim splits input separated by a comma
// splitAndTrim splits input separated by a comma
// and trims excessive white space from the substrings.
// and trims excessive white space from the substrings.
func
splitAndTrim
(
input
string
)
[]
string
{
func
splitAndTrim
(
input
string
)
(
ret
[]
string
)
{
result
:=
strings
.
Split
(
input
,
","
)
l
:=
strings
.
Split
(
input
,
","
)
for
i
,
r
:=
range
result
{
for
_
,
r
:=
range
l
{
result
[
i
]
=
strings
.
TrimSpace
(
r
)
r
=
strings
.
TrimSpace
(
r
)
if
len
(
r
)
>
0
{
ret
=
append
(
ret
,
r
)
}
}
return
result
}
return
ret
}
}
// setHTTP creates the HTTP RPC listener interface string from the set
// setHTTP creates the HTTP RPC listener interface string from the set
...
...
node/config.go
View file @
6d8e51ab
...
@@ -102,11 +102,11 @@ type Config struct {
...
@@ -102,11 +102,11 @@ type Config struct {
// a simple file name, it is placed inside the data directory (or on the root
// a simple file name, it is placed inside the data directory (or on the root
// pipe path on Windows), whereas if it's a resolvable path name (absolute or
// pipe path on Windows), whereas if it's a resolvable path name (absolute or
// relative), then that specific path is enforced. An empty path disables IPC.
// relative), then that specific path is enforced. An empty path disables IPC.
IPCPath
string
`toml:",omitempty"`
IPCPath
string
// HTTPHost is the host interface on which to start the HTTP RPC server. If this
// HTTPHost is the host interface on which to start the HTTP RPC server. If this
// field is empty, no HTTP API endpoint will be started.
// field is empty, no HTTP API endpoint will be started.
HTTPHost
string
`toml:",omitempty"`
HTTPHost
string
// HTTPPort is the TCP port number on which to start the HTTP RPC server. The
// HTTPPort is the TCP port number on which to start the HTTP RPC server. The
// default zero value is/ valid and will pick a port number randomly (useful
// default zero value is/ valid and will pick a port number randomly (useful
...
@@ -130,7 +130,7 @@ type Config struct {
...
@@ -130,7 +130,7 @@ type Config struct {
// HTTPModules is a list of API modules to expose via the HTTP RPC interface.
// HTTPModules is a list of API modules to expose via the HTTP RPC interface.
// If the module list is empty, all RPC API endpoints designated public will be
// If the module list is empty, all RPC API endpoints designated public will be
// exposed.
// exposed.
HTTPModules
[]
string
`toml:",omitempty"`
HTTPModules
[]
string
// HTTPTimeouts allows for customization of the timeout values used by the HTTP RPC
// HTTPTimeouts allows for customization of the timeout values used by the HTTP RPC
// interface.
// interface.
...
@@ -138,7 +138,7 @@ type Config struct {
...
@@ -138,7 +138,7 @@ type Config struct {
// WSHost is the host interface on which to start the websocket RPC server. If
// WSHost is the host interface on which to start the websocket RPC server. If
// this field is empty, no websocket API endpoint will be started.
// this field is empty, no websocket API endpoint will be started.
WSHost
string
`toml:",omitempty"`
WSHost
string
// WSPort is the TCP port number on which to start the websocket RPC server. The
// WSPort is the TCP port number on which to start the websocket RPC server. The
// default zero value is/ valid and will pick a port number randomly (useful for
// default zero value is/ valid and will pick a port number randomly (useful for
...
@@ -153,7 +153,7 @@ type Config struct {
...
@@ -153,7 +153,7 @@ type Config struct {
// WSModules is a list of API modules to expose via the websocket RPC interface.
// WSModules is a list of API modules to expose via the websocket RPC interface.
// If the module list is empty, all RPC API endpoints designated public will be
// If the module list is empty, all RPC API endpoints designated public will be
// exposed.
// exposed.
WSModules
[]
string
`toml:",omitempty"`
WSModules
[]
string
// WSExposeAll exposes all API modules via the WebSocket RPC interface rather
// WSExposeAll exposes all API modules via the WebSocket RPC interface rather
// than just the public ones.
// than just the public ones.
...
@@ -164,7 +164,7 @@ type Config struct {
...
@@ -164,7 +164,7 @@ type Config struct {
// GraphQLHost is the host interface on which to start the GraphQL server. If this
// GraphQLHost is the host interface on which to start the GraphQL server. If this
// field is empty, no GraphQL API endpoint will be started.
// field is empty, no GraphQL API endpoint will be started.
GraphQLHost
string
`toml:",omitempty"`
GraphQLHost
string
// GraphQLPort is the TCP port number on which to start the GraphQL server. The
// GraphQLPort is the TCP port number on which to start the GraphQL server. The
// default zero value is/ valid and will pick a port number randomly (useful
// default zero value is/ valid and will pick a port number randomly (useful
...
...
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