aboutsummaryrefslogtreecommitdiffstats
path: root/whisper
diff options
context:
space:
mode:
authorVlad <gluk256@gmail.com>2018-03-02 21:54:54 +0800
committerVlad <gluk256@gmail.com>2018-03-02 21:54:54 +0800
commit6219a338225f1a4dfb7e51212ec3dde6e32785ce (patch)
tree194e340c55df55eb08deabe6b6ae89f97a26b430 /whisper
parenta76e46e3d7cb77bfcbc95d92df9f4b6ccdd742f2 (diff)
downloadgo-tangerine-6219a338225f1a4dfb7e51212ec3dde6e32785ce.tar
go-tangerine-6219a338225f1a4dfb7e51212ec3dde6e32785ce.tar.gz
go-tangerine-6219a338225f1a4dfb7e51212ec3dde6e32785ce.tar.bz2
go-tangerine-6219a338225f1a4dfb7e51212ec3dde6e32785ce.tar.lz
go-tangerine-6219a338225f1a4dfb7e51212ec3dde6e32785ce.tar.xz
go-tangerine-6219a338225f1a4dfb7e51212ec3dde6e32785ce.tar.zst
go-tangerine-6219a338225f1a4dfb7e51212ec3dde6e32785ce.zip
whisper: filereader mode introduced to wnode
Diffstat (limited to 'whisper')
-rw-r--r--whisper/whisperv6/envelope.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/whisper/whisperv6/envelope.go b/whisper/whisperv6/envelope.go
index 2c80d47bc..2f947f1a4 100644
--- a/whisper/whisperv6/envelope.go
+++ b/whisper/whisperv6/envelope.go
@@ -208,6 +208,10 @@ func (e *Envelope) OpenSymmetric(key []byte) (msg *ReceivedMessage, err error) {
// Open tries to decrypt an envelope, and populates the message fields in case of success.
func (e *Envelope) Open(watcher *Filter) (msg *ReceivedMessage) {
+ if watcher == nil {
+ return nil
+ }
+
// The API interface forbids filters doing both symmetric and asymmetric encryption.
if watcher.expectsAsymmetricEncryption() && watcher.expectsSymmetricEncryption() {
return nil