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
ec88bd0c
Unverified
Commit
ec88bd0c
authored
Jun 30, 2021
by
Sina Mahmoodi
Committed by
GitHub
Jun 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/geth: dont fail on deprecated toml config fields (#23118)
parent
acdf9238
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
config.go
cmd/geth/config.go
+11
-1
No files found.
cmd/geth/config.go
View file @
ec88bd0c
...
@@ -31,6 +31,7 @@ import (
...
@@ -31,6 +31,7 @@ import (
"github.com/ethereum/go-ethereum/eth/catalyst"
"github.com/ethereum/go-ethereum/eth/catalyst"
"github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/eth/ethconfig"
"github.com/ethereum/go-ethereum/internal/ethapi"
"github.com/ethereum/go-ethereum/internal/ethapi"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/metrics"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/params"
...
@@ -63,7 +64,12 @@ var tomlSettings = toml.Config{
...
@@ -63,7 +64,12 @@ var tomlSettings = toml.Config{
return
field
return
field
},
},
MissingField
:
func
(
rt
reflect
.
Type
,
field
string
)
error
{
MissingField
:
func
(
rt
reflect
.
Type
,
field
string
)
error
{
link
:=
""
id
:=
fmt
.
Sprintf
(
"%s.%s"
,
rt
.
String
(),
field
)
if
deprecated
(
id
)
{
log
.
Warn
(
"Config field is deprecated and won't have an effect"
,
"name"
,
id
)
return
nil
}
var
link
string
if
unicode
.
IsUpper
(
rune
(
rt
.
Name
()[
0
]))
&&
rt
.
PkgPath
()
!=
"main"
{
if
unicode
.
IsUpper
(
rune
(
rt
.
Name
()[
0
]))
&&
rt
.
PkgPath
()
!=
"main"
{
link
=
fmt
.
Sprintf
(
", see https://godoc.org/%s#%s for available fields"
,
rt
.
PkgPath
(),
rt
.
Name
())
link
=
fmt
.
Sprintf
(
", see https://godoc.org/%s#%s for available fields"
,
rt
.
PkgPath
(),
rt
.
Name
())
}
}
...
@@ -228,3 +234,7 @@ func applyMetricConfig(ctx *cli.Context, cfg *gethConfig) {
...
@@ -228,3 +234,7 @@ func applyMetricConfig(ctx *cli.Context, cfg *gethConfig) {
cfg
.
Metrics
.
InfluxDBTags
=
ctx
.
GlobalString
(
utils
.
MetricsInfluxDBTagsFlag
.
Name
)
cfg
.
Metrics
.
InfluxDBTags
=
ctx
.
GlobalString
(
utils
.
MetricsInfluxDBTagsFlag
.
Name
)
}
}
}
}
func
deprecated
(
field
string
)
bool
{
return
false
}
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