mirror of
https://github.com/monero-project/monero.git
synced 2024-12-14 04:16:32 +02:00
blockchain: remove unused output_scan_worker parameter
This commit is contained in:
parent
1426209a10
commit
5808530f54
@ -3786,8 +3786,7 @@ bool Blockchain::cleanup_handle_incoming_blocks(bool force_sync)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
//FIXME: unused parameter txs
|
void Blockchain::output_scan_worker(const uint64_t amount, const std::vector<uint64_t> &offsets, std::vector<output_data_t> &outputs) const
|
||||||
void Blockchain::output_scan_worker(const uint64_t amount, const std::vector<uint64_t> &offsets, std::vector<output_data_t> &outputs, std::unordered_map<crypto::hash, cryptonote::transaction> &txs) const
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -4164,9 +4163,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete
|
|||||||
offsets.second.erase(last, offsets.second.end());
|
offsets.second.erase(last, offsets.second.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
// [output] stores all transactions for each tx_out_index::hash found
|
// gather all the output keys
|
||||||
std::vector<std::unordered_map<crypto::hash, cryptonote::transaction>> transactions(amounts.size());
|
|
||||||
|
|
||||||
threads = tpool.get_max_concurrency();
|
threads = tpool.get_max_concurrency();
|
||||||
if (!m_db->can_thread_bulk_indices())
|
if (!m_db->can_thread_bulk_indices())
|
||||||
threads = 1;
|
threads = 1;
|
||||||
@ -4178,7 +4175,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete
|
|||||||
for (size_t i = 0; i < amounts.size(); i++)
|
for (size_t i = 0; i < amounts.size(); i++)
|
||||||
{
|
{
|
||||||
uint64_t amount = amounts[i];
|
uint64_t amount = amounts[i];
|
||||||
tpool.submit(&waiter, boost::bind(&Blockchain::output_scan_worker, this, amount, std::cref(offset_map[amount]), std::ref(tx_map[amount]), std::ref(transactions[i])), true);
|
tpool.submit(&waiter, boost::bind(&Blockchain::output_scan_worker, this, amount, std::cref(offset_map[amount]), std::ref(tx_map[amount])), true);
|
||||||
}
|
}
|
||||||
waiter.wait(&tpool);
|
waiter.wait(&tpool);
|
||||||
}
|
}
|
||||||
@ -4187,7 +4184,7 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete
|
|||||||
for (size_t i = 0; i < amounts.size(); i++)
|
for (size_t i = 0; i < amounts.size(); i++)
|
||||||
{
|
{
|
||||||
uint64_t amount = amounts[i];
|
uint64_t amount = amounts[i];
|
||||||
output_scan_worker(amount, offset_map[amount], tx_map[amount], transactions[i]);
|
output_scan_worker(amount, offset_map[amount], tx_map[amount]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -916,11 +916,9 @@ namespace cryptonote
|
|||||||
* @param amount the amount
|
* @param amount the amount
|
||||||
* @param offsets the indices (indexed to the amount) of the outputs
|
* @param offsets the indices (indexed to the amount) of the outputs
|
||||||
* @param outputs return-by-reference the outputs collected
|
* @param outputs return-by-reference the outputs collected
|
||||||
* @param txs unused, candidate for removal
|
|
||||||
*/
|
*/
|
||||||
void output_scan_worker(const uint64_t amount,const std::vector<uint64_t> &offsets,
|
void output_scan_worker(const uint64_t amount,const std::vector<uint64_t> &offsets,
|
||||||
std::vector<output_data_t> &outputs, std::unordered_map<crypto::hash,
|
std::vector<output_data_t> &outputs) const;
|
||||||
cryptonote::transaction> &txs) const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief computes the "short" and "long" hashes for a set of blocks
|
* @brief computes the "short" and "long" hashes for a set of blocks
|
||||||
|
Loading…
Reference in New Issue
Block a user