mirror of
https://github.com/monero-project/monero.git
synced 2026-07-28 22:51:07 -07:00
wallet2: guard optimized coinbase refresh against empty vout
This commit is contained in:
@@ -3362,11 +3362,14 @@ void wallet2::process_parsed_blocks(const uint64_t start_height, const std::vect
|
||||
{
|
||||
THROW_WALLET_EXCEPTION_IF(txidx >= tx_cache_data.size(), error::wallet_internal_error, "txidx out of range");
|
||||
const cryptonote::transaction& tx = parsed_blocks[i].block.miner_tx;
|
||||
const size_t n_vouts = (m_refresh_type == RefreshType::RefreshOptimizeCoinbase && tx.version < 2) ? 1 : tx.vout.size();
|
||||
if (parsed_blocks[i].block.major_version >= hf_version_view_tags)
|
||||
geniods.push_back(geniod_params{ tx, n_vouts, txidx });
|
||||
else
|
||||
tpool.submit(&waiter, [&, n_vouts, txidx](){ geniod(tx, n_vouts, txidx); }, true);
|
||||
const size_t n_vouts = (m_refresh_type == RefreshType::RefreshOptimizeCoinbase && tx.version < 2 && !tx.vout.empty()) ? 1 : tx.vout.size();
|
||||
if (n_vouts > 0)
|
||||
{
|
||||
if (parsed_blocks[i].block.major_version >= hf_version_view_tags)
|
||||
geniods.push_back(geniod_params{ tx, n_vouts, txidx });
|
||||
else
|
||||
tpool.submit(&waiter, [&, n_vouts, txidx](){ geniod(tx, n_vouts, txidx); }, true);
|
||||
}
|
||||
}
|
||||
++txidx;
|
||||
for (size_t j = 0; j < parsed_blocks[i].txes.size(); ++j)
|
||||
|
||||
Reference in New Issue
Block a user