mirror of
https://github.com/monero-project/monero.git
synced 2026-01-14 13:56:43 -08:00
core: avoid double parsing blocks after hoh
This commit is contained in:
@@ -4211,13 +4211,14 @@ uint64_t Blockchain::prevalidate_block_hashes(uint64_t height, const std::vector
|
||||
// vs [k_image, output_keys] (m_scan_table). This is faster because it takes advantage of bulk queries
|
||||
// and is threaded if possible. The table (m_scan_table) will be used later when querying output
|
||||
// keys.
|
||||
bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete_entry> &blocks_entry)
|
||||
bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete_entry> &blocks_entry, std::vector<block> &blocks)
|
||||
{
|
||||
MTRACE("Blockchain::" << __func__);
|
||||
TIME_MEASURE_START(prepare);
|
||||
bool stop_batch;
|
||||
uint64_t bytes = 0;
|
||||
size_t total_txs = 0;
|
||||
blocks.clear();
|
||||
|
||||
// Order of locking must be:
|
||||
// m_incoming_tx_lock (optional)
|
||||
@@ -4264,7 +4265,6 @@ bool Blockchain::prepare_handle_incoming_blocks(const std::vector<block_complete
|
||||
bool blocks_exist = false;
|
||||
tools::threadpool& tpool = tools::threadpool::getInstance();
|
||||
unsigned threads = tpool.get_max_concurrency();
|
||||
std::vector<block> blocks;
|
||||
blocks.resize(blocks_entry.size());
|
||||
|
||||
if (1)
|
||||
|
||||
Reference in New Issue
Block a user