diff options
author | b00ris <b00ris@mail.ru> | 2018-09-05 16:57:45 +0800 |
---|---|---|
committer | Guillaume Ballet <gballet@gmail.com> | 2018-09-05 16:57:45 +0800 |
commit | 8711e2b6366109912057e8fb20add325a1051a4e (patch) | |
tree | 70ad2598573f8774ec77acf57598e24d7200634b /whisper/whisperv6/api.go | |
parent | cf33d8b83ce78d1e79cd8c43a21070b2050d5c7e (diff) | |
download | dexon-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 'whisper/whisperv6/api.go')
-rw-r--r-- | whisper/whisperv6/api.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/whisper/whisperv6/api.go b/whisper/whisperv6/api.go index d729e79c3..e1dab7b22 100644 --- a/whisper/whisperv6/api.go +++ b/whisper/whisperv6/api.go @@ -195,14 +195,14 @@ func (api *PublicWhisperAPI) DeleteSymKey(ctx context.Context, id string) bool { // MakeLightClient turns the node into light client, which does not forward // any incoming messages, and sends only messages originated in this node. func (api *PublicWhisperAPI) MakeLightClient(ctx context.Context) bool { - api.w.lightClient = true - return api.w.lightClient + api.w.SetLightClientMode(true) + return api.w.LightClientMode() } // CancelLightClient cancels light client mode. func (api *PublicWhisperAPI) CancelLightClient(ctx context.Context) bool { - api.w.lightClient = false - return !api.w.lightClient + api.w.SetLightClientMode(false) + return !api.w.LightClientMode() } //go:generate gencodec -type NewMessage -field-override newMessageOverride -out gen_newmessage_json.go |