1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

Merge pull request #752 from majestrate/master

always regen expired rc
This commit is contained in:
Jeff 2019-08-05 10:40:54 -04:00 committed by GitHub
commit fc64b83c13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -631,16 +631,16 @@ namespace llarp
const bool isSvcNode = IsServiceNode();
if(_rc.ExpiresSoon(now, randint() % 10000)
|| (now - _rc.last_updated) > rcRegenInterval)
{
LogInfo("regenerating RC");
if(!UpdateOurRC(false))
LogError("Failed to update our RC");
}
if(isSvcNode)
{
if(_rc.ExpiresSoon(now, randint() % 10000)
|| (now - _rc.last_updated) > rcRegenInterval)
{
LogInfo("regenerating RC");
if(!UpdateOurRC(false))
LogError("Failed to update our RC");
}
// remove RCs for nodes that are no longer allowed by network policy
nodedb()->RemoveIf([&](const RouterContact &rc) -> bool {
if(IsBootstrapNode(rc.pubkey))