From 0628dbaab98a8759ec892dfe352530d83451de0d Mon Sep 17 00:00:00 2001 From: lash Date: Sat, 24 Jun 2017 08:07:57 +0200 Subject: [PATCH] cmd/swarm: added websocket capability (for pss) --- cmd/swarm/main.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index 1818d05194..705e81a389 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -267,6 +267,14 @@ Cleans database of corrupted entries. // pss flags PssEnabledFlag, } + rpcFlags := []cli.Flag{ + utils.WSEnabledFlag, + utils.WSListenAddrFlag, + utils.WSPortFlag, + utils.WSApiFlag, + utils.WSAllowedOriginsFlag, + } + app.Flags = append(app.Flags, rpcFlags...) app.Flags = append(app.Flags, debug.Flags...) app.Before = func(ctx *cli.Context) error { runtime.GOMAXPROCS(runtime.NumCPU()) @@ -301,6 +309,9 @@ func version(ctx *cli.Context) error { func bzzd(ctx *cli.Context) error { cfg := defaultNodeConfig + if ctx.GlobalBool(PssEnabledFlag.Name) && ctx.GlobalBool(utils.WSEnabledFlag.Name) { + cfg.WSModules = append(cfg.WSModules, "pss") + } utils.SetNodeConfig(ctx, &cfg) stack, err := node.New(&cfg) if err != nil {