Schedule asmap health check to run once 5 mins after node starts

This commit is contained in:
Duke
2024-12-03 11:28:11 -05:00
parent cceb61c371
commit ecf98cbce1

View File

@@ -1848,8 +1848,6 @@ void ThreadOpenConnections()
OpenNetworkConnection(addrConnect,/*failures,*/ &grant, NULL, false, fFeeler);
}
}
// Do a health check now that we hopefully have peers
ASMapHealthCheck();
}
void ThreadOpenAddedConnections()
@@ -2410,6 +2408,9 @@ void StartNode(boost::thread_group& threadGroup, CScheduler& scheduler)
// Schedule ASMap Health check to run regularly
scheduler.scheduleEvery(&ASMapHealthCheck, ASMAP_HEALTHCHECK_INTERVAL);
// and schedule it to run once in 5 mins when we hopefully have peers connected
scheduler.scheduleFromNow(&ASMapHealthCheck, 300);
}
bool StopNode()