diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-12-01 14:31:40 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-12-01 14:31:40 +0000 |
commit | 0e18f4652200bbfd1173ad44f9766b9740a75524 (patch) | |
tree | ca3817afc19aa6e11352f6372b1ed702417a1c4d /src/blockchain_db | |
parent | db_lmdb: guard against going out of sync on unexpected db results (diff) | |
download | monero-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')
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.cpp | 2 |
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())); |