mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
new: heimdall flags
This commit is contained in:
parent
6cb5e62868
commit
706e2881e2
4 changed files with 18 additions and 4 deletions
|
|
@ -74,7 +74,7 @@ The dumpgenesis command dumps the genesis block configuration in JSON format to
|
||||||
Action: utils.MigrateFlags(importChain),
|
Action: utils.MigrateFlags(importChain),
|
||||||
Name: "import",
|
Name: "import",
|
||||||
Usage: "Import a blockchain file",
|
Usage: "Import a blockchain file",
|
||||||
ArgsUsage: "<filename> (<filename 2> ... <filename N>) ",
|
ArgsUsage: "<filename> (<filename 2> ... <filename N>) <genesisPath>",
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
utils.DataDirFlag,
|
utils.DataDirFlag,
|
||||||
utils.CacheFlag,
|
utils.CacheFlag,
|
||||||
|
|
@ -94,6 +94,10 @@ The dumpgenesis command dumps the genesis block configuration in JSON format to
|
||||||
utils.MetricsInfluxDBPasswordFlag,
|
utils.MetricsInfluxDBPasswordFlag,
|
||||||
utils.MetricsInfluxDBTagsFlag,
|
utils.MetricsInfluxDBTagsFlag,
|
||||||
utils.TxLookupLimitFlag,
|
utils.TxLookupLimitFlag,
|
||||||
|
|
||||||
|
// bor related flags
|
||||||
|
utils.HeimdallURLFlag,
|
||||||
|
utils.WithoutHeimdallFlag,
|
||||||
},
|
},
|
||||||
Category: "BLOCKCHAIN COMMANDS",
|
Category: "BLOCKCHAIN COMMANDS",
|
||||||
Description: `
|
Description: `
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ func defaultNodeConfig() node.Config {
|
||||||
cfg.Version = params.VersionWithCommit(gitCommit, gitDate)
|
cfg.Version = params.VersionWithCommit(gitCommit, gitDate)
|
||||||
cfg.HTTPModules = append(cfg.HTTPModules, "eth")
|
cfg.HTTPModules = append(cfg.HTTPModules, "eth")
|
||||||
cfg.WSModules = append(cfg.WSModules, "eth")
|
cfg.WSModules = append(cfg.WSModules, "eth")
|
||||||
cfg.IPCPath = "geth.ipc"
|
cfg.IPCPath = clientIdentifier + ".ipc"
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
clientIdentifier = "geth" // Client identifier to advertise over the network
|
clientIdentifier = "bor" // Client identifier to advertise over the network
|
||||||
|
repositoryIdentifier = "go-bor"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -54,7 +55,7 @@ var (
|
||||||
gitCommit = ""
|
gitCommit = ""
|
||||||
gitDate = ""
|
gitDate = ""
|
||||||
// The app that holds all commands and flags.
|
// The app that holds all commands and flags.
|
||||||
app = flags.NewApp(gitCommit, gitDate, "the go-ethereum command line interface")
|
app = flags.NewApp(gitCommit, gitDate, fmt.Sprintf("the %s command line interface", repositoryIdentifier))
|
||||||
// flags that configure the node
|
// flags that configure the node
|
||||||
nodeFlags = []cli.Flag{
|
nodeFlags = []cli.Flag{
|
||||||
utils.IdentityFlag,
|
utils.IdentityFlag,
|
||||||
|
|
@ -259,6 +260,9 @@ func init() {
|
||||||
app.Flags = append(app.Flags, whisperFlags...)
|
app.Flags = append(app.Flags, whisperFlags...)
|
||||||
app.Flags = append(app.Flags, metricsFlags...)
|
app.Flags = append(app.Flags, metricsFlags...)
|
||||||
|
|
||||||
|
// add bor flags
|
||||||
|
app.Flags = append(app.Flags, utils.BorFlags...)
|
||||||
|
|
||||||
app.Before = func(ctx *cli.Context) error {
|
app.Before = func(ctx *cli.Context) error {
|
||||||
return debug.Setup(ctx)
|
return debug.Setup(ctx)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,12 @@ var (
|
||||||
Name: "bor.withoutheimdall",
|
Name: "bor.withoutheimdall",
|
||||||
Usage: "Run without Heimdall service (for testing purpose)",
|
Usage: "Run without Heimdall service (for testing purpose)",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BorFlags all bor related flags
|
||||||
|
BorFlags = []cli.Flag{
|
||||||
|
HeimdallURLFlag,
|
||||||
|
WithoutHeimdallFlag,
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func getGenesis(genesisPath string) (*core.Genesis, error) {
|
func getGenesis(genesisPath string) (*core.Genesis, error) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue