From eabbb83149b1039e4540f2d5826544b52bfd8f7e Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Tue, 27 Aug 2019 16:07:09 -0400 Subject: [PATCH] use estimated build time instead of expiration time for delta when determining when to space out builds --- llarp/service/endpoint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index 8b419a56d..a30bf1fca 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -1205,10 +1205,10 @@ namespace llarp // time from now that the newest intro expires at if(intro.ExpiresSoon(now)) return should; - const auto dlt = intro.expiresAt - now; + const auto dlt = now - (intro.expiresAt - path::default_lifetime); return should || ( // try spacing tunnel builds out evenly in time - (dlt < (path::default_lifetime / 4)) + (dlt >= (path::default_lifetime / 4)) && (NumInStatus(path::ePathBuilding) < numPaths) && !path::Builder::BuildCooldownHit(now)); }