mirror of
https://github.com/status-im/status-go.git
synced 2025-02-08 12:54:37 +00:00
whisper standalone mode (#498)
This commit is contained in:
parent
5446a09029
commit
596b7ea2e1
@ -23,6 +23,7 @@ var (
|
|||||||
// Whisper
|
// Whisper
|
||||||
identity = flag.String("identity", "", "Protocol identity file (private key used for asymmetric encryption)")
|
identity = flag.String("identity", "", "Protocol identity file (private key used for asymmetric encryption)")
|
||||||
passwordFile = flag.String("passwordfile", "", "Password file (password is used for symmetric encryption)")
|
passwordFile = flag.String("passwordfile", "", "Password file (password is used for symmetric encryption)")
|
||||||
|
standalone = flag.Bool("standalone", true, "Don't actively connect to peers, wait for incoming connections")
|
||||||
minPow = flag.Float64("pow", params.WhisperMinimumPoW, "PoW for messages to be added to queue, in float format")
|
minPow = flag.Float64("pow", params.WhisperMinimumPoW, "PoW for messages to be added to queue, in float format")
|
||||||
ttl = flag.Int("ttl", params.WhisperTTL, "Time to live for messages, in seconds")
|
ttl = flag.Int("ttl", params.WhisperTTL, "Time to live for messages, in seconds")
|
||||||
|
|
||||||
@ -106,5 +107,10 @@ func makeNodeConfig() (*params.NodeConfig, error) {
|
|||||||
nodeConfig.IPCEnabled = *ipcEnabled
|
nodeConfig.IPCEnabled = *ipcEnabled
|
||||||
nodeConfig.RPCEnabled = *httpEnabled
|
nodeConfig.RPCEnabled = *httpEnabled
|
||||||
|
|
||||||
|
if *standalone {
|
||||||
|
nodeConfig.BootClusterConfig.Enabled = false
|
||||||
|
nodeConfig.BootClusterConfig.BootNodes = nil
|
||||||
|
}
|
||||||
|
|
||||||
return nodeConfig, nil
|
return nodeConfig, nil
|
||||||
}
|
}
|
||||||
|
@ -119,6 +119,11 @@ func defaultEmbeddedNodeConfig(config *params.NodeConfig) *node.Config {
|
|||||||
nc.HTTPPort = config.HTTPPort
|
nc.HTTPPort = config.HTTPPort
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !config.BootClusterConfig.Enabled {
|
||||||
|
nc.P2P.BootstrapNodes = nil
|
||||||
|
nc.P2P.BootstrapNodesV5 = nil
|
||||||
|
}
|
||||||
|
|
||||||
return nc
|
return nc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user