aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
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/geth
parentcf33d8b83ce78d1e79cd8c43a21070b2050d5c7e (diff)
downloaddexon-8711e2b6366109912057e8fb20add325a1051a4e.tar
dexon-8711e2b6366109912057e8fb20add325a1051a4e.tar.gz
dexon-8711e2b6366109912057e8fb20add325a1051a4e.tar.bz2
dexon-8711e2b6366109912057e8fb20add325a1051a4e.tar.lz
dexon-8711e2b6366109912057e8fb20add325a1051a4e.tar.xz
dexon-8711e2b6366109912057e8fb20add325a1051a4e.tar.zst
dexon-8711e2b6366109912057e8fb20add325a1051a4e.zip
whisper: add light mode check to handshake (#16725)
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/config.go3
-rw-r--r--cmd/geth/main.go1
2 files changed, 4 insertions, 0 deletions
diff --git a/cmd/geth/config.go b/cmd/geth/config.go
index e6bd4d5be..b0749d232 100644
--- a/cmd/geth/config.go
+++ b/cmd/geth/config.go
@@ -168,6 +168,9 @@ func makeFullNode(ctx *cli.Context) *node.Node {
if ctx.GlobalIsSet(utils.WhisperMinPOWFlag.Name) {
cfg.Shh.MinimumAcceptedPOW = ctx.Float64(utils.WhisperMinPOWFlag.Name)
}
+ if ctx.GlobalIsSet(utils.WhisperRestrictConnectionBetweenLightClientsFlag.Name) {
+ cfg.Shh.RestrictConnectionBetweenLightClients = true
+ }
utils.RegisterShhService(stack, &cfg.Shh)
}
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index 4d7e98698..134d5a4c0 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -151,6 +151,7 @@ var (
utils.WhisperEnabledFlag,
utils.WhisperMaxMessageSizeFlag,
utils.WhisperMinPOWFlag,
+ utils.WhisperRestrictConnectionBetweenLightClientsFlag,
}
metricsFlags = []cli.Flag{