diff --git a/sdk/wot.go b/sdk/wot.go index a6acf14..1f527fd 100644 --- a/sdk/wot.go +++ b/sdk/wot.go @@ -149,13 +149,17 @@ func makeWoTFilter(m chan string) WotXorFilter { } xf, _ := xorfilter.Populate(shids) - return WotXorFilter{*xf} + return WotXorFilter{len(shids), *xf} } type WotXorFilter struct { + Items int xorfilter.Xor8 } func (wxf WotXorFilter) Contains(pubkey string) bool { + if wxf.Items == 0 { + return false + } return wxf.Xor8.Contains(PubKeyToShid(pubkey)) }