mirror of https://github.com/oxen-io/lokinet
explicit not found for non staked nodes
This commit is contained in:
parent
8853e1d3d8
commit
15fd9c1bef
|
@ -35,6 +35,12 @@ namespace llarp
|
|||
Key_t peer;
|
||||
// check if we know this in our nodedb first
|
||||
RouterContact found;
|
||||
if(!dht.GetRouter()->ConnectionToRouterAllowed(K))
|
||||
{
|
||||
// explicitly disallowed by network
|
||||
replies.emplace_back(new GotRouterMessage(k, txid, {}, false));
|
||||
return true;
|
||||
}
|
||||
if(dht.GetRouter()->nodedb()->Get(K, found))
|
||||
{
|
||||
replies.emplace_back(new GotRouterMessage(k, txid, {found}, false));
|
||||
|
@ -166,6 +172,12 @@ namespace llarp
|
|||
Key_t k{K};
|
||||
if(exploritory)
|
||||
return dht.HandleExploritoryRouterLookup(From, txid, K, replies);
|
||||
else if(!dht.GetRouter()->ConnectionToRouterAllowed(K))
|
||||
{
|
||||
// explicitly disallowed by network
|
||||
replies.emplace_back(new GotRouterMessage(k, txid, {}, false));
|
||||
return true;
|
||||
}
|
||||
else if(dht.Nodes()->HasNode(k))
|
||||
{
|
||||
found = dht.Nodes()->nodes[k].rc;
|
||||
|
|
Loading…
Reference in New Issue