mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
core: allow empty global indices for txes with empty vout
This commit is contained in:
parent
887db9f936
commit
91ca0b4065
1 changed files with 6 additions and 1 deletions
|
@ -2149,7 +2149,12 @@ bool Blockchain::get_tx_outputs_gindexs(const crypto::hash& tx_id, std::vector<u
|
||||||
|
|
||||||
// get amount output indexes, currently referred to in parts as "output global indices", but they are actually specific to amounts
|
// 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_index);
|
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");
|
if (indexs.empty())
|
||||||
|
{
|
||||||
|
// empty indexs is only valid if the vout is empty, which is legal but rare
|
||||||
|
cryptonote::transaction tx = m_db->get_tx(tx_id);
|
||||||
|
CHECK_AND_ASSERT_MES(tx.vout.empty(), false, "internal error: global indexes for transaction " << tx_id << " is empty, and tx vout is not");
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue