|
|
@ -790,11 +790,6 @@ var ( |
|
|
|
Usage: "InfluxDB organization name (v2 only)", |
|
|
|
Usage: "InfluxDB organization name (v2 only)", |
|
|
|
Value: metrics.DefaultConfig.InfluxDBOrganization, |
|
|
|
Value: metrics.DefaultConfig.InfluxDBOrganization, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CatalystFlag = cli.BoolFlag{ |
|
|
|
|
|
|
|
Name: "catalyst", |
|
|
|
|
|
|
|
Usage: "Catalyst mode (eth2 integration testing)", |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
// MakeDataDir retrieves the currently requested data directory, terminating
|
|
|
|
// 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.
|
|
|
|
// RegisterEthService adds an Ethereum client to the stack.
|
|
|
|
// The second return value is the full node instance, which may be nil if the
|
|
|
|
// The second return value is the full node instance, which may be nil if the
|
|
|
|
// node is running as a light client.
|
|
|
|
// 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 { |
|
|
|
if cfg.SyncMode == downloader.LightSync { |
|
|
|
backend, err := les.New(stack, cfg) |
|
|
|
backend, err := les.New(stack, cfg) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
Fatalf("Failed to register the Ethereum service: %v", err) |
|
|
|
Fatalf("Failed to register the Ethereum service: %v", err) |
|
|
|
} |
|
|
|
} |
|
|
|
stack.RegisterAPIs(tracers.APIs(backend.ApiBackend)) |
|
|
|
stack.RegisterAPIs(tracers.APIs(backend.ApiBackend)) |
|
|
|
if isCatalyst { |
|
|
|
if backend.BlockChain().Config().TerminalTotalDifficulty != nil { |
|
|
|
if err := lescatalyst.Register(stack, backend); err != nil { |
|
|
|
if err := lescatalyst.Register(stack, backend); err != nil { |
|
|
|
Fatalf("Failed to register the catalyst service: %v", err) |
|
|
|
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) |
|
|
|
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 { |
|
|
|
if err := ethcatalyst.Register(stack, backend); err != nil { |
|
|
|
Fatalf("Failed to register the catalyst service: %v", err) |
|
|
|
Fatalf("Failed to register the catalyst service: %v", err) |
|
|
|
} |
|
|
|
} |
|
|
|