commit 0f9d55d4f9c012c10dd0c26aa3db2a59bba805c5
parent 4109649dc206c80e30fa392f61284c472981d131
Author: William Casarin <jb55@jb55.com>
Date: Thu, 23 Nov 2023 13:18:17 -0800
nostrdb/debug: use mdb_strerror in more places
instead of codes
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nostrdb/nostrdb.c b/nostrdb/nostrdb.c
@@ -2170,13 +2170,13 @@ static int ndb_init_lmdb(const char *filename, struct ndb_lmdb *lmdb, size_t map
// index dbs
if ((rc = mdb_dbi_open(txn, "note_id", tsid_flags, &lmdb->dbs[NDB_DB_NOTE_ID]))) {
- fprintf(stderr, "mdb_dbi_open id failed, error %d\n", rc);
+ fprintf(stderr, "mdb_dbi_open id failed: %s\n", mdb_strerror(rc));
return 0;
}
mdb_set_compare(txn, lmdb->dbs[NDB_DB_NOTE_ID], ndb_tsid_compare);
if ((rc = mdb_dbi_open(txn, "profile_pk", tsid_flags, &lmdb->dbs[NDB_DB_PROFILE_PK]))) {
- fprintf(stderr, "mdb_dbi_open id failed, error %d\n", rc);
+ fprintf(stderr, "mdb_dbi_open id failed: %s\n", mdb_strerror(rc));
return 0;
}
mdb_set_compare(txn, lmdb->dbs[NDB_DB_PROFILE_PK], ndb_tsid_compare);