mirror of
https://github.com/monero-project/monero.git
synced 2025-07-22 22:10:45 -04:00
Schema update: tx_indices - improve further with less indirection
This commit is contained in:
parent
7c013f66e9
commit
8d12a8df2c
4 changed files with 56 additions and 21 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue