nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit 24e1c0a89107beac578e19a3c21a20bf1a26d716
parent ebe92071af181b1296ad4ad41b0e16ef9b1acf35
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 27 Nov 2023 16:39:54 -0800

Fix invalid db selection when writing kind index

Fixes: ebe92071af18 ("index: write kind index when processing notes")

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

diff --git a/nostrdb.c b/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;