forked from such-gitea/wownero-lws
Don't log MDB_NOTFOUND with subaddress lookup (#208)
This commit is contained in:
committed by
Lee *!* Clagett
parent
320cf03b2b
commit
c65a1f488b
@@ -1087,7 +1087,13 @@ namespace db
|
|||||||
MDB_val key = lmdb::to_val(id);
|
MDB_val key = lmdb::to_val(id);
|
||||||
MDB_val value = lmdb::to_val(address);
|
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)
|
||||||
|
{
|
||||||
|
if (err != MDB_NOTFOUND)
|
||||||
|
return log_lmdb_error(err, __LINE__, __FILE__);
|
||||||
|
return {lmdb::error(err)}; // do not log MDB_NOTFOUND; expected
|
||||||
|
}
|
||||||
return subaddress_indexes.get_value<MONERO_FIELD(subaddress_map, index)>(value);
|
return subaddress_indexes.get_value<MONERO_FIELD(subaddress_map, index)>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user