A few odds and ends after lookahead patch (#215)

This commit is contained in:
Lee *!* Clagett
2025-12-07 11:37:17 -05:00
committed by Lee *!* Clagett
parent 16111cae2c
commit 770e3b0ca4
6 changed files with 20 additions and 14 deletions

View File

@@ -1100,7 +1100,9 @@ namespace db
MDB_val key = lmdb::to_val(type);
MDB_val value = lmdb::to_val(address);
MLWS_LMDB_CHECK(mdb_cursor_get(cur.get(), &key, &value, MDB_GET_BOTH));
const int err = mdb_cursor_get(cur.get(), &key, &value, MDB_GET_BOTH);
if (err)
return log_lmdb_error(err, __LINE__, __FILE__, MDB_NOTFOUND);
return requests.get_value<request_info>(value);
}
@@ -1148,11 +1150,7 @@ namespace db
const int err = mdb_cursor_get(cur.get(), &key, &value, MDB_GET_BOTH);
if (err)
{
if (err != MDB_NOTFOUND)
return log_lmdb_error(err, __LINE__, __FILE__);
return {lmdb::error(err)}; // do not log MDB_NOTFOUND; expected
}
return log_lmdb_error(err, __LINE__, __FILE__, MDB_NOTFOUND);
return subaddress_indexes.get_value<MONERO_FIELD(subaddress_map, index)>(value);
}