damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit fa9b9522959ad3d19098ddb5618004c5fa3ad1fb
parent 27f55bc09f41ff1e3035e6275ae7cc0d0eed949a
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 12 Jan 2025 17:45:10 -0800

nostrdb: add is_replaceable_kind helper

we will be using this to detect replaceable kinds

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mnostrdb/src/nostrdb.c | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/nostrdb/src/nostrdb.c b/nostrdb/src/nostrdb.c @@ -263,6 +263,15 @@ struct ndb_search_words int num_words; }; + +static inline int is_replaceable_kind(uint64_t kind) +{ + return kind == 0 || kind == 3 + || (10000 <= kind && kind < 20000) + || (30000 <= kind && kind < 40000); +} + + // ndb_text_search_key // // This is compressed when in lmdb: