From ecf98cbce17cb7202a066f49b7381902183f7353 Mon Sep 17 00:00:00 2001 From: Duke Date: Tue, 3 Dec 2024 11:28:11 -0500 Subject: [PATCH] Schedule asmap health check to run once 5 mins after node starts --- src/net.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net.cpp b/src/net.cpp index a87b41cb6..05f66d246 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -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()