From 2dcf75a722f193ef5528f5af8fb4fd7c5824fded Mon Sep 17 00:00:00 2001 From: gluk256 Date: Thu, 1 Dec 2016 20:09:22 +0100 Subject: whisper/shhapi, whisper/whisperv5: refactoring (#3364) * Filter refactoring * API tests added + bugfix * fixed the error logs * FilterID fixed * test cases fixed * key generation updated * POW updated * got rid of redundant stuff --- whisper/whisperv5/peer.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'whisper/whisperv5/peer.go') diff --git a/whisper/whisperv5/peer.go b/whisper/whisperv5/peer.go index fc1afb6d6..4273cfce1 100644 --- a/whisper/whisperv5/peer.go +++ b/whisper/whisperv5/peer.go @@ -165,6 +165,9 @@ func (p *Peer) broadcast() error { p.mark(envelope) } } + if len(transmit) == 0 { + return nil + } // Transmit the unknown batch (potentially empty) if err := p2p.Send(p.ws, messagesCode, transmit); err != nil { return err -- cgit v1.2.3