mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
whisper: fix empty topic
This commit is contained in:
parent
1c2378b926
commit
3b2ff9a71d
2 changed files with 2 additions and 2 deletions
|
|
@ -562,7 +562,7 @@ func (api *PublicWhisperAPI) NewMessageFilter(req Criteria) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(req.Topics) > 0 {
|
if len(req.Topics) > 0 {
|
||||||
topics = make([][]byte, 1)
|
topics = make([][]byte, 0, 1)
|
||||||
for _, topic := range req.Topics {
|
for _, topic := range req.Topics {
|
||||||
topics = append(topics, topic[:])
|
topics = append(topics, topic[:])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -562,7 +562,7 @@ func (api *PublicWhisperAPI) NewMessageFilter(req Criteria) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(req.Topics) > 0 {
|
if len(req.Topics) > 0 {
|
||||||
topics = make([][]byte, 1)
|
topics = make([][]byte, 0, 1)
|
||||||
for _, topic := range req.Topics {
|
for _, topic := range req.Topics {
|
||||||
topics = append(topics, topic[:])
|
topics = append(topics, topic[:])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue