nostrdb: ndb_filter_is_subset_of
subset testing for filters. Can be used to see if one subset is redundant in the presence of a another in the local relay model Changelog-Added: Add ndb_filter_is_subset_of Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
44ab702792
commit
573de6b881
@@ -499,6 +499,9 @@ int ndb_filter_add_int_element(struct ndb_filter *, uint64_t integer);
|
||||
int ndb_filter_add_str_element(struct ndb_filter *, const char *str);
|
||||
int ndb_filter_eq(struct ndb_filter *, struct ndb_filter *);
|
||||
|
||||
/// is `a` a subset of `b`
|
||||
int ndb_filter_is_subset_of(struct ndb_filter *a, struct ndb_filter *b);
|
||||
|
||||
// filters from json
|
||||
int ndb_filter_from_json(const char *, int len, struct ndb_filter *filter, unsigned char *buf, int bufsize);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user