bump path build handover window, check cooldown on build.

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

@ -1208,8 +1208,9 @@ namespace llarp
const auto dlt = intro.expiresAt - now;
return should
|| ( // try spacing tunnel builds out evenly in time
(dlt <= (path::default_lifetime / 4))
&& (NumInStatus(path::ePathBuilding) < numPaths));
(dlt < (path::default_lifetime / 4))
&& (NumInStatus(path::ePathBuilding) < numPaths)
&& !path::Builder::BuildCooldownHit(now));
}
std::shared_ptr< Logic >

@ -30,7 +30,7 @@ namespace llarp
}
bool
ExpiresSoon(llarp_time_t now, llarp_time_t dlt = 15000) const
ExpiresSoon(llarp_time_t now, llarp_time_t dlt = 30000) const
{
if(dlt)
return now >= (expiresAt - dlt);

Loading…
Cancel
Save