diff options
author | b00ris <b00ris@mail.ru> | 2018-01-26 19:41:53 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-01-26 19:41:53 +0800 |
commit | 2ef3815af41c7a12dd798416b4a5ae74c09706c8 (patch) | |
tree | dbddf454c44306cdf6f223f155c7ae7e08f0b32d /whisper/whisperv6/api.go | |
parent | 4dd0727c393fcade1a6835db2f753f0a365ed073 (diff) | |
download | go-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.go | 2 |
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[:]) } |