aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv6/filter.go
diff options
context:
space:
mode:
authorEugene Valeyev <evgen.povt@gmail.com>2018-08-13 22:27:25 +0800
committerGuillaume Ballet <gballet@gmail.com>2018-08-13 22:27:25 +0800
commite07e507d1af687cd64b263038ebd3cb7be74fb40 (patch)
tree0b515ed937abceb3425ae4a17d72821db6b4f90e /whisper/whisperv6/filter.go
parentd8328a96b4943798f9dd2a8ae1c787f7e78ff8e4 (diff)
downloaddexon-e07e507d1af687cd64b263038ebd3cb7be74fb40.tar
dexon-e07e507d1af687cd64b263038ebd3cb7be74fb40.tar.gz
dexon-e07e507d1af687cd64b263038ebd3cb7be74fb40.tar.bz2
dexon-e07e507d1af687cd64b263038ebd3cb7be74fb40.tar.lz
dexon-e07e507d1af687cd64b263038ebd3cb7be74fb40.tar.xz
dexon-e07e507d1af687cd64b263038ebd3cb7be74fb40.tar.zst
dexon-e07e507d1af687cd64b263038ebd3cb7be74fb40.zip
whisper: fixed broken partial topic filtering
Changes in #15811 broke partial topic filtering. Re-enable it.
Diffstat (limited to 'whisper/whisperv6/filter.go')
-rw-r--r--whisper/whisperv6/filter.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/whisper/whisperv6/filter.go b/whisper/whisperv6/filter.go
index 2f170ddeb..6a5b79674 100644
--- a/whisper/whisperv6/filter.go
+++ b/whisper/whisperv6/filter.go
@@ -250,23 +250,6 @@ func (f *Filter) MatchEnvelope(envelope *Envelope) bool {
return f.PoW <= 0 || envelope.pow >= f.PoW
}
-func matchSingleTopic(topic TopicType, bt []byte) bool {
- if len(bt) > TopicLength {
- bt = bt[:TopicLength]
- }
-
- if len(bt) < TopicLength {
- return false
- }
-
- for j, b := range bt {
- if topic[j] != b {
- return false
- }
- }
- return true
-}
-
// IsPubKeyEqual checks that two public keys are equal
func IsPubKeyEqual(a, b *ecdsa.PublicKey) bool {
if !ValidatePublicKey(a) {