From ad8200a5731e462cf191e49570359283d760b372 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 20 Dec 2014 18:36:22 +0000 Subject: db_lmdb: fix global index calculation off by 1 This finally fixes raw tx being accepted by the daemon. --- src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp b/src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp index ee5c0fa9b..5b71dcf08 100644 --- a/src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp +++ b/src/cryptonote_core/BlockchainDB_impl/db_lmdb.cpp @@ -1304,9 +1304,9 @@ std::vector BlockchainLMDB::get_tx_output_indices(const crypto::hash& for (uint64_t i = 0; i < num_elems; ++i) { - mdb_cursor_get(cur, &k, &v, MDB_NEXT_DUP); mdb_cursor_get(cur, &k, &v, MDB_GET_CURRENT); index_vec.push_back(*(const uint64_t *)v.mv_data); + mdb_cursor_get(cur, &k, &v, MDB_NEXT_DUP); } cur.close(); -- cgit v1.2.3