whisper: fix empty topic (#15811)
* whisper: fix empty topic * whisper: add check to matchSingleTopic * whisper: add tests * whisper: fix gosimple * whisper: added lastTopicByte const
This commit is contained in:
@ -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[:])
|
||||
}
|
||||
|
Reference in New Issue
Block a user