aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv6/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/whisperv6/api.go
parent4dd0727c393fcade1a6835db2f753f0a365ed073 (diff)
downloadgo-tangerine-2ef3815af41c7a12dd798416b4a5ae74c09706c8.tar
go-tangerine-2ef3815af41c7a12dd798416b4a5ae74c09706c8.tar.gz
go-tangerine-2ef3815af41c7a12dd798416b4a5ae74c09706c8.tar.bz2
go-tangerine-2ef3815af41c7a12dd798416b4a5ae74c09706c8.tar.lz
go-tangerine-2ef3815af41c7a12dd798416b4a5ae74c09706c8.tar.xz
go-tangerine-2ef3815af41c7a12dd798416b4a5ae74c09706c8.tar.zst
go-tangerine-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/whisperv6/api.go')
-rw-r--r--whisper/whisperv6/api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/whisper/whisperv6/api.go b/whisper/whisperv6/api.go
index 0e8490b41..2f6f671e9 100644
--- a/whisper/whisperv6/api.go
+++ b/whisper/whisperv6/api.go
@@ -567,7 +567,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[:])
}