aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-01 14:31:40 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-01 14:31:40 +0000
commit0e18f4652200bbfd1173ad44f9766b9740a75524 (patch)
treeca3817afc19aa6e11352f6372b1ed702417a1c4d /src/blockchain_db/lmdb
parentdb_lmdb: guard against going out of sync on unexpected db results (diff)
downloadmonero-0e18f4652200bbfd1173ad44f9766b9740a75524.tar.xz
db_lmdb: add info in an error message when we can't get an output
Will be useful to debug
Diffstat (limited to 'src/blockchain_db/lmdb')
-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 91a576b4e..1ad9876ac 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -2600,7 +2600,7 @@ void BlockchainLMDB::get_output_key(const uint64_t &amount, const std::vector<ui
auto get_result = mdb_cursor_get(m_cur_output_amounts, &k, &v, MDB_GET_BOTH);
if (get_result == MDB_NOTFOUND)
- throw1(OUTPUT_DNE("Attempting to get output pubkey by global index, but key does not exist"));
+ throw1(OUTPUT_DNE((std::string("Attempting to get output pubkey by global index (amount ") + boost::lexical_cast<std::string>(amount) + ", index " + boost::lexical_cast<std::string>(index) + ", count " + boost::lexical_cast<std::string>(get_num_outputs(amount)) + "), but key does not exist").c_str()));
else if (get_result)
throw0(DB_ERROR(lmdb_error("Error attempting to retrieve an output pubkey from the db", get_result).c_str()));