use estimated build time instead of expiration time for delta when determining when to space out builds

pull/789/head
Jeff Becker 5 years ago
parent e0424a91a7
commit eabbb83149
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -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));
}

Loading…
Cancel
Save