mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
add SwarmSwapDisabled=bbzswapdisabled SwarmPort=bzzport flags
This commit is contained in:
parent
e85b9b7397
commit
75cf91803e
2 changed files with 10 additions and 0 deletions
|
|
@ -315,6 +315,8 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
|
||||||
utils.ExecFlag,
|
utils.ExecFlag,
|
||||||
utils.WhisperEnabledFlag,
|
utils.WhisperEnabledFlag,
|
||||||
utils.SwarmConfigPathFlag,
|
utils.SwarmConfigPathFlag,
|
||||||
|
utils.SwarmSwapDisabled,
|
||||||
|
utils.SwarmPortFlag,
|
||||||
utils.SwarmAccountAddrFlag,
|
utils.SwarmAccountAddrFlag,
|
||||||
utils.ChequebookAddrFlag,
|
utils.ChequebookAddrFlag,
|
||||||
utils.DevModeFlag,
|
utils.DevModeFlag,
|
||||||
|
|
|
||||||
|
|
@ -361,6 +361,10 @@ var (
|
||||||
Name: "bzzaccount",
|
Name: "bzzaccount",
|
||||||
Usage: "Swarm account address (swarm disabled if empty)",
|
Usage: "Swarm account address (swarm disabled if empty)",
|
||||||
}
|
}
|
||||||
|
SwarmPortFlag = cli.StringFlag{
|
||||||
|
Name: "bzzport",
|
||||||
|
Usage: "Swarm local http api port",
|
||||||
|
}
|
||||||
SwarmConfigPathFlag = cli.StringFlag{
|
SwarmConfigPathFlag = cli.StringFlag{
|
||||||
Name: "bzzconfig",
|
Name: "bzzconfig",
|
||||||
Usage: "Swarm config file path (datadir/bzz)",
|
Usage: "Swarm config file path (datadir/bzz)",
|
||||||
|
|
@ -796,6 +800,10 @@ func MakeSystemNode(name, version string, extra []byte, ctx *cli.Context) *node.
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Fatalf("unable to configure swarm: %v", err)
|
Fatalf("unable to configure swarm: %v", err)
|
||||||
}
|
}
|
||||||
|
bzzport := ctx.GlobalString(SwarmPortFlag.Name)
|
||||||
|
if len(bzzport) > 0 {
|
||||||
|
bzzconfig.Port = bzzport
|
||||||
|
}
|
||||||
swap := ctx.GlobalBool(SwarmSwapDisabled.Name)
|
swap := ctx.GlobalBool(SwarmSwapDisabled.Name)
|
||||||
if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
|
if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) {
|
||||||
return swarm.NewSwarm(ctx, bzzconfig, swap)
|
return swarm.NewSwarm(ctx, bzzconfig, swap)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue