aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db/lmdb/db_lmdb.cpp
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2016-01-07 15:14:16 +0000
committerHoward Chu <hyc@symas.com>2016-02-17 04:05:29 +0000
commit1537477c9f0481df007e519d9971feb4f57bae03 (patch)
tree69a1b58976c109a55066b0eb35378b621e6e79f3 /src/blockchain_db/lmdb/db_lmdb.cpp
parentUse MDB_APPEND mode where possible (diff)
downloadmonero-1537477c9f0481df007e519d9971feb4f57bae03.tar.xz
Use cursor in get_output_key
Diffstat (limited to '')
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 805b56ef4..aec584e56 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -2525,13 +2525,14 @@ void BlockchainLMDB::get_output_key(const uint64_t &amount, const std::vector<ui
if (global_indices.size() > 0)
{
TXN_PREFIX_RDONLY();
+ lmdb_cur cur(*txn_ptr, m_output_keys);
for (const uint64_t &index : global_indices)
{
MDB_val_copy<uint64_t> k(index);
MDB_val v;
- auto get_result = mdb_get(*txn_ptr, m_output_keys, &k, &v);
+ auto get_result = mdb_cursor_get(cur, &k, &v, MDB_SET);
if (get_result == MDB_NOTFOUND)
throw1(OUTPUT_DNE("Attempting to get output pubkey by global index, but key does not exist"));
else if (get_result)