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
d99e759e
Unverified
Commit
d99e759e
authored
Feb 02, 2022
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: auto-enable beacon APIs if TTD is defined
parent
afe344bc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
11 deletions
+4
-11
config.go
cmd/geth/config.go
+1
-1
main.go
cmd/geth/main.go
+0
-1
usage.go
cmd/geth/usage.go
+0
-1
flags.go
cmd/utils/flags.go
+3
-8
No files found.
cmd/geth/config.go
View file @
d99e759e
...
...
@@ -161,7 +161,7 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
if
ctx
.
GlobalIsSet
(
utils
.
OverrideTerminalTotalDifficulty
.
Name
)
{
cfg
.
Eth
.
OverrideTerminalTotalDifficulty
=
new
(
big
.
Int
)
.
SetUint64
(
ctx
.
GlobalUint64
(
utils
.
OverrideTerminalTotalDifficulty
.
Name
))
}
backend
,
_
:=
utils
.
RegisterEthService
(
stack
,
&
cfg
.
Eth
,
ctx
.
GlobalBool
(
utils
.
CatalystFlag
.
Name
)
)
backend
,
_
:=
utils
.
RegisterEthService
(
stack
,
&
cfg
.
Eth
)
// Configure GraphQL if requested
if
ctx
.
GlobalIsSet
(
utils
.
GraphQLEnabledFlag
.
Name
)
{
...
...
cmd/geth/main.go
View file @
d99e759e
...
...
@@ -157,7 +157,6 @@ var (
utils
.
GpoIgnoreGasPriceFlag
,
utils
.
MinerNotifyFullFlag
,
configFileFlag
,
utils
.
CatalystFlag
,
}
rpcFlags
=
[]
cli
.
Flag
{
...
...
cmd/geth/usage.go
View file @
d99e759e
...
...
@@ -229,7 +229,6 @@ var AppHelpFlagGroups = []flags.FlagGroup{
utils
.
SnapshotFlag
,
utils
.
BloomFilterSizeFlag
,
cli
.
HelpFlag
,
utils
.
CatalystFlag
,
},
},
}
...
...
cmd/utils/flags.go
View file @
d99e759e
...
...
@@ -790,11 +790,6 @@ var (
Usage
:
"InfluxDB organization name (v2 only)"
,
Value
:
metrics
.
DefaultConfig
.
InfluxDBOrganization
,
}
CatalystFlag
=
cli
.
BoolFlag
{
Name
:
"catalyst"
,
Usage
:
"Catalyst mode (eth2 integration testing)"
,
}
)
// MakeDataDir retrieves the currently requested data directory, terminating
...
...
@@ -1717,14 +1712,14 @@ func SetDNSDiscoveryDefaults(cfg *ethconfig.Config, genesis common.Hash) {
// RegisterEthService adds an Ethereum client to the stack.
// The second return value is the full node instance, which may be nil if the
// node is running as a light client.
func
RegisterEthService
(
stack
*
node
.
Node
,
cfg
*
ethconfig
.
Config
,
isCatalyst
bool
)
(
ethapi
.
Backend
,
*
eth
.
Ethereum
)
{
func
RegisterEthService
(
stack
*
node
.
Node
,
cfg
*
ethconfig
.
Config
)
(
ethapi
.
Backend
,
*
eth
.
Ethereum
)
{
if
cfg
.
SyncMode
==
downloader
.
LightSync
{
backend
,
err
:=
les
.
New
(
stack
,
cfg
)
if
err
!=
nil
{
Fatalf
(
"Failed to register the Ethereum service: %v"
,
err
)
}
stack
.
RegisterAPIs
(
tracers
.
APIs
(
backend
.
ApiBackend
))
if
isCatalyst
{
if
backend
.
BlockChain
()
.
Config
()
.
TerminalTotalDifficulty
!=
nil
{
if
err
:=
lescatalyst
.
Register
(
stack
,
backend
);
err
!=
nil
{
Fatalf
(
"Failed to register the catalyst service: %v"
,
err
)
}
...
...
@@ -1741,7 +1736,7 @@ func RegisterEthService(stack *node.Node, cfg *ethconfig.Config, isCatalyst bool
Fatalf
(
"Failed to create the LES server: %v"
,
err
)
}
}
if
isCatalyst
{
if
backend
.
BlockChain
()
.
Config
()
.
TerminalTotalDifficulty
!=
nil
{
if
err
:=
ethcatalyst
.
Register
(
stack
,
backend
);
err
!=
nil
{
Fatalf
(
"Failed to register the catalyst service: %v"
,
err
)
}
...
...
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