swarm config file options take precedence over command line arguments #3444

This commit is contained in:
Zahoor Mohamed 2016-12-21 20:54:13 +05:30
parent 954e67b5b8
commit b30aab4638

View file

@ -252,6 +252,10 @@ func registerBzzService(ctx *cli.Context, stack *node.Node) {
if len(bzzport) > 0 { if len(bzzport) > 0 {
bzzconfig.Port = bzzport bzzconfig.Port = bzzport
} }
networkId := ctx.GlobalUint64(SwarmNetworkIdFlag.Name)
if networkId > 0 {
bzzconfig.NetworkId = networkId
}
swapEnabled := ctx.GlobalBool(SwarmSwapEnabled.Name) swapEnabled := ctx.GlobalBool(SwarmSwapEnabled.Name)
syncEnabled := ctx.GlobalBoolT(SwarmSyncEnabled.Name) syncEnabled := ctx.GlobalBoolT(SwarmSyncEnabled.Name)