Fix lmdb txn commit code

Lee *!* Clagett 2 months ago
parent c8214782fb
commit ee930140cc

@ -123,8 +123,11 @@ namespace lmdb
const auto wrote = f(*(*txn)); const auto wrote = f(*(*txn));
if (wrote) if (wrote)
{ {
MONERO_CHECK(commit(std::move(*txn))); const auto committed = commit(std::move(*txn));
return wrote; if (committed)
return wrote;
if (committed != lmdb::error(MDB_MAP_FULL))
return committed.error();
} }
if (wrote != lmdb::error(MDB_MAP_FULL)) if (wrote != lmdb::error(MDB_MAP_FULL))
return wrote; return wrote;

Loading…
Cancel
Save