cmd/swarm, cmd/geth: Activate pss module on websocket (geth -> swarm)

This commit is contained in:
lash 2017-12-17 00:53:02 +01:00
parent 07e47e0abd
commit 7f79b01105
2 changed files with 7 additions and 1 deletions

View file

@ -104,7 +104,7 @@ func defaultNodeConfig() node.Config {
cfg.Name = clientIdentifier cfg.Name = clientIdentifier
cfg.Version = params.VersionWithCommit(gitCommit) cfg.Version = params.VersionWithCommit(gitCommit)
cfg.HTTPModules = append(cfg.HTTPModules, "eth", "shh") cfg.HTTPModules = append(cfg.HTTPModules, "eth", "shh")
cfg.WSModules = append(cfg.WSModules, "eth", "shh", "pss") cfg.WSModules = append(cfg.WSModules, "eth", "shh")
cfg.IPCPath = "geth.ipc" cfg.IPCPath = "geth.ipc"
return cfg return cfg
} }

View file

@ -419,6 +419,12 @@ func bzzd(ctx *cli.Context) error {
} }
cfg := defaultNodeConfig cfg := defaultNodeConfig
//pss operates on ws
if bzzconfig.PssEnabled {
cfg.WSModules = append(cfg.WSModules, "pss")
}
//geth only supports --datadir via command line //geth only supports --datadir via command line
//in order to be consistent within swarm, if we pass --datadir via environment variable //in order to be consistent within swarm, if we pass --datadir via environment variable
//or via config file, we get the same directory for geth and swarm //or via config file, we get the same directory for geth and swarm