mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
cmd/swarm: added websocket capability (for pss)
This commit is contained in:
parent
7ab9a617eb
commit
0628dbaab9
1 changed files with 11 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue