Skip to content

Commit

Permalink
db_lmdb: add info in an error message when we can't get an output
Browse files Browse the repository at this point in the history
Will be useful to debug
  • Loading branch information
moneromooo-monero committed Dec 1, 2016
1 parent c96f9b0 commit 0e18f46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/blockchain_db/lmdb/db_lmdb.cpp
Expand Up @@ -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()));

Expand Down

0 comments on commit 0e18f46

Please sign in to comment.