diff options
author | warptangent <warptangent@tutanota.com> | 2016-03-04 10:59:20 -0800 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2016-04-05 20:54:06 +0100 |
commit | 8d12a8df2cf27713509c039c91fb9180e010011a (patch) | |
tree | e5e6c8cd7ebd0344aaaad4c4a347a3a04ad65d12 /src/cryptonote_core | |
parent | Add batch warning for further review (diff) | |
download | monero-8d12a8df2cf27713509c039c91fb9180e010011a.tar.xz |
Schema update: tx_indices - improve further with less indirection
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 2aa8ecec4..f5c912d76 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1949,14 +1949,15 @@ bool Blockchain::get_tx_outputs_gindexs(const crypto::hash& tx_id, std::vector<u { LOG_PRINT_L3("Blockchain::" << __func__); CRITICAL_REGION_LOCAL(m_blockchain_lock); - if (!m_db->tx_exists(tx_id)) + uint64_t tx_index; + if (!m_db->tx_exists(tx_id, tx_index)) { LOG_PRINT_RED_L1("warning: get_tx_outputs_gindexs failed to find transaction with id = " << tx_id); return false; } // get amount output indexes, currently referred to in parts as "output global indices", but they are actually specific to amounts - indexs = m_db->get_tx_amount_output_indices(tx_id); + indexs = m_db->get_tx_amount_output_indices(tx_index); CHECK_AND_ASSERT_MES(indexs.size(), false, "internal error: global indexes for transaction " << tx_id << " is empty"); return true; |