diff options
| author | Riccardo Spagni <ric@spagni.net> | 2016-08-29 10:42:14 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2016-08-29 10:42:14 +0200 |
| commit | c915bffa5169fd0501265e6965cda69bc7d2813a (patch) | |
| tree | b2ff190a16f48e1793c698967f63739d5a052bd7 | |
| parent | 16e9dbc3f83207e21b51a986b67ee4e3d9e34d07 (diff) | |
| parent | 91ca0b4065597b16b72a172f9f40993de588e026 (diff) | |
| download | monzero-core-c915bffa5169fd0501265e6965cda69bc7d2813a.tar.gz monzero-core-c915bffa5169fd0501265e6965cda69bc7d2813a.tar.xz monzero-core-c915bffa5169fd0501265e6965cda69bc7d2813a.zip | |
Merge pull request #1002
91ca0b4 core: allow empty global indices for txes with empty vout (moneromooo-monero)
| -rw-r--r-- | src/cryptonote_core/blockchain.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index ef72dac59..07db59796 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -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 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; } |
