aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils
diff options
context:
space:
mode:
authorb00ris <b00ris@mail.ru>2018-09-05 16:57:45 +0800
committerGuillaume Ballet <gballet@gmail.com>2018-09-05 16:57:45 +0800
commit8711e2b6366109912057e8fb20add325a1051a4e (patch)
tree70ad2598573f8774ec77acf57598e24d7200634b /cmd/utils
parentcf33d8b83ce78d1e79cd8c43a21070b2050d5c7e (diff)
downloadgo-tangerine-8711e2b6366109912057e8fb20add325a1051a4e.tar
go-tangerine-8711e2b6366109912057e8fb20add325a1051a4e.tar.gz
go-tangerine-8711e2b6366109912057e8fb20add325a1051a4e.tar.bz2
go-tangerine-8711e2b6366109912057e8fb20add325a1051a4e.tar.lz
go-tangerine-8711e2b6366109912057e8fb20add325a1051a4e.tar.xz
go-tangerine-8711e2b6366109912057e8fb20add325a1051a4e.tar.zst
go-tangerine-8711e2b6366109912057e8fb20add325a1051a4e.zip
whisper: add light mode check to handshake (#16725)
Diffstat (limited to 'cmd/utils')
-rw-r--r--cmd/utils/flags.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 495bfe13e..f431621ba 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -567,6 +567,10 @@ var (
Usage: "Minimum POW accepted",
Value: whisper.DefaultMinimumPoW,
}
+ WhisperRestrictConnectionBetweenLightClientsFlag = cli.BoolFlag{
+ Name: "shh.restrict-light",
+ Usage: "Restrict connection between two whisper light clients",
+ }
// Metrics flags
MetricsEnabledFlag = cli.BoolFlag{
@@ -1099,6 +1103,9 @@ func SetShhConfig(ctx *cli.Context, stack *node.Node, cfg *whisper.Config) {
if ctx.GlobalIsSet(WhisperMinPOWFlag.Name) {
cfg.MinimumAcceptedPOW = ctx.GlobalFloat64(WhisperMinPOWFlag.Name)
}
+ if ctx.GlobalIsSet(WhisperRestrictConnectionBetweenLightClientsFlag.Name) {
+ cfg.RestrictConnectionBetweenLightClients = true
+ }
}
// SetEthConfig applies eth-related command line flags to the config.