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