damus

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

commit 53fc1b694551333619a48b40d3d4dc439282d07c
parent ff60f8a2dbe92f92d9e6f6acbd8b6c615dde60f7
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 27 Nov 2023 16:39:54 -0800

nostrdb/Fix invalid db selection when writing kind index

Fixes: ebe92071af18 ("index: write kind index when processing notes")
Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mnostrdb/nostrdb.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nostrdb/nostrdb.c b/nostrdb/nostrdb.c @@ -1868,7 +1868,7 @@ static int ndb_write_note_kind_index(struct ndb_txn *txn, struct ndb_note *note, kind_db = txn->lmdb->dbs[NDB_DB_NOTE_KIND]; - if ((rc = mdb_put(txn->mdb_txn, id_db, &key, &val, 0))) { + if ((rc = mdb_put(txn->mdb_txn, kind_db, &key, &val, 0))) { ndb_debug("write note kind index to db failed: %s\n", mdb_strerror(rc)); return 0;