mirror of
https://github.com/monero-project/monero.git
synced 2025-12-22 23:26:44 -08:00
wallet2: fix infinite loop on future refresh height
If the refresh height is in the future, the current code will loop till the actual height reaches this. Fix it by bailing out if we receive only three hashes, which is what we set in the call parameters.
This commit is contained in:
@@ -1601,7 +1601,7 @@ void wallet2::fast_refresh(uint64_t stop_height, uint64_t &blocks_start_height,
|
||||
while(m_run.load(std::memory_order_relaxed) && current_index < stop_height)
|
||||
{
|
||||
pull_hashes(0, blocks_start_height, short_chain_history, hashes);
|
||||
if (hashes.size() < 3)
|
||||
if (hashes.size() <= 3)
|
||||
return;
|
||||
if (hashes.size() + current_index < stop_height) {
|
||||
std::list<crypto::hash>::iterator right;
|
||||
|
||||
Reference in New Issue
Block a user