aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-01 14:29:35 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-01 14:29:35 +0000
commitc96f9b0255dc8b62055a693a24bfdc8e1b6e1b90 (patch)
treedb0837e641dba7f4f9350d9cda92ad4183a902ed /src
parentdb_lmdb: minor pedantic tweaks (diff)
downloadmonero-c96f9b0255dc8b62055a693a24bfdc8e1b6e1b90.tar.xz
db_lmdb: guard against going out of sync on unexpected db results
m_num_outputs keeps track of the number of outputs, which should be the same as the size of both the output_txs and output_amounts databases. If one goes out of sync, we need to throw to abort whatever it is we were doing.
Diffstat (limited to '')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index ea33dc6c9..91a576b4e 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -910,7 +910,7 @@ void BlockchainLMDB::remove_output(const uint64_t amount, const uint64_t& out_in
result = mdb_cursor_get(m_cur_output_txs, (MDB_val *)&zerokval, &otxk, MDB_GET_BOTH);
if (result == MDB_NOTFOUND)
{
- LOG_PRINT_L0("Unexpected: global output index not found in m_output_txs");
+ throw0(DB_ERROR("Unexpected: global output index not found in m_output_txs"));
}
else if (result)
{