handle wot filter error.
This commit is contained in:
10
sdk/wot.go
10
sdk/wot.go
@@ -150,7 +150,15 @@ func makeWoTFilter(m chan nostr.PubKey) WotXorFilter {
|
||||
}
|
||||
}
|
||||
|
||||
xf, _ := xorfilter.Populate(shids)
|
||||
if len(shids) == 0 {
|
||||
return WotXorFilter{}
|
||||
}
|
||||
|
||||
xf, err := xorfilter.Populate(shids)
|
||||
if err != nil {
|
||||
nostr.InfoLogger.Println("failed to populate filter", len(shids), err)
|
||||
return WotXorFilter{}
|
||||
}
|
||||
return WotXorFilter{len(shids), *xf}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user