Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.cpp
Show First 20 Lines • Show All 545 Lines • ▼ Show 20 Lines | for (const auto &p : timedout_items) { | ||||
continue; | continue; | ||||
} | } | ||||
it->second.clearInflightRequest(p.second); | it->second.clearInflightRequest(p.second); | ||||
} | } | ||||
} | } | ||||
void Processor::runEventLoop() { | void Processor::runEventLoop() { | ||||
// Don't do Avalanche while node is IBD'ing | |||||
if (::ChainstateActive().IsInitialBlockDownload()) { | |||||
return; | |||||
} | |||||
// First things first, check if we have requests that timed out and clear | // First things first, check if we have requests that timed out and clear | ||||
// them. | // them. | ||||
clearTimedoutRequests(); | clearTimedoutRequests(); | ||||
// Make sure there is at least one suitable node to query before gathering | // Make sure there is at least one suitable node to query before gathering | ||||
// invs. | // invs. | ||||
NodeId nodeid = getSuitableNodeToQuery(); | NodeId nodeid = getSuitableNodeToQuery(); | ||||
if (nodeid == NO_NODE) { | if (nodeid == NO_NODE) { | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |