aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv5/api.go
diff options
context:
space:
mode:
authorb00ris <b00ris@mail.ru>2018-01-26 19:41:53 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-26 19:41:53 +0800
commit2ef3815af41c7a12dd798416b4a5ae74c09706c8 (patch)
treedbddf454c44306cdf6f223f155c7ae7e08f0b32d /whisper/whisperv5/api.go
parent4dd0727c393fcade1a6835db2f753f0a365ed073 (diff)
downloaddexon-2ef3815af41c7a12dd798416b4a5ae74c09706c8.tar.gz
dexon-2ef3815af41c7a12dd798416b4a5ae74c09706c8.tar.zst
dexon-2ef3815af41c7a12dd798416b4a5ae74c09706c8.zip
whisper: fix empty topic (#15811)
* whisper: fix empty topic * whisper: add check to matchSingleTopic * whisper: add tests * whisper: fix gosimple * whisper: added lastTopicByte const
Diffstat (limited to 'whisper/whisperv5/api.go')
-rw-r--r--whisper/whisperv5/api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/whisper/whisperv5/api.go b/whisper/whisperv5/api.go
index 96c4b0e6c..b4494d0d6 100644
--- a/whisper/whisperv5/api.go
+++ b/whisper/whisperv5/api.go
@@ -562,7 +562,7 @@ func (api *PublicWhisperAPI) NewMessageFilter(req Criteria) (string, error) {
}
if len(req.Topics) > 0 {
- topics = make([][]byte, 1)
+ topics = make([][]byte, 0, len(req.Topics))
for _, topic := range req.Topics {
topics = append(topics, topic[:])
}