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