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
This commit is contained in:
gluk256
2016-12-01 20:09:22 +01:00
committed by Felix Lange
parent 671fd94e25
commit 2dcf75a722
14 changed files with 830 additions and 652 deletions

View File

@ -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