diff --git a/src/nostrdb.c b/src/nostrdb.c index e194722..ce6e129 100644 --- a/src/nostrdb.c +++ b/src/nostrdb.c @@ -6854,7 +6854,7 @@ int ndb_print_search_keys(struct ndb_txn *txn) continue; } - ndb_print_text_search_key(&search_key); + ndb_print_text_search_key(k.mv_size, &search_key); printf("\n"); i++; diff --git a/src/print_util.h b/src/print_util.h index faa5bbd..3007c0c 100644 --- a/src/print_util.h +++ b/src/print_util.h @@ -1,14 +1,6 @@ #include "hex.h" #include "lmdb.h" -static void ndb_print_text_search_key(struct ndb_text_search_key *key) -{ - printf("K<'%.*s' %" PRIu64 " %" PRIu64 " note_id:%" PRIu64 ">", (int)key->str_len, key->str, - key->word_index, - key->timestamp, - key->note_id); -} - static void print_hex(unsigned char* data, size_t size) { size_t i; for (i = 0; i < size; i++) { @@ -16,6 +8,17 @@ static void print_hex(unsigned char* data, size_t size) { } } +static void ndb_print_text_search_key(int bytes_size, struct ndb_text_search_key *key) +{ + printf("K<'%.*s' %" PRIu64 " %" PRIu64 " note_id:%" PRIu64 " bytes:%d>", (int)key->str_len, key->str, + key->word_index, + key->timestamp, + key->note_id, + bytes_size + ); + +} + static void print_tag_kv(struct ndb_txn *txn, MDB_val *k, MDB_val *v) { char hex_id[65];