From 53fc1b694551333619a48b40d3d4dc439282d07c Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 27 Nov 2023 16:39:54 -0800 Subject: [PATCH] nostrdb/Fix invalid db selection when writing kind index Fixes: ebe92071af18 ("index: write kind index when processing notes") Signed-off-by: William Casarin --- nostrdb/nostrdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nostrdb/nostrdb.c b/nostrdb/nostrdb.c index 96343734..95b7e61e 100644 --- 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;