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

always regen expired rc

This commit is contained in:
Jeff Becker 2019-08-05 09:39:27 -04:00
parent b6987a389c
commit 70ddc84d3a
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05

View file

@ -631,8 +631,6 @@ namespace llarp
const bool isSvcNode = IsServiceNode();
if(isSvcNode)
{
if(_rc.ExpiresSoon(now, randint() % 10000)
|| (now - _rc.last_updated) > rcRegenInterval)
{
@ -641,6 +639,8 @@ namespace llarp
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))