mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
more logging
This commit is contained in:
parent
01724c8529
commit
207e312eb0
@ -106,14 +106,22 @@ namespace llarp
|
||||
const auto itr = m_KeyToIP.find(pk);
|
||||
if(itr != m_KeyToIP.cend())
|
||||
{
|
||||
found = itr->second;
|
||||
found.h = itr->second.h;
|
||||
}
|
||||
else
|
||||
{
|
||||
// allocate and map
|
||||
found = AllocateNewAddress();
|
||||
m_KeyToIP[pk] = found;
|
||||
m_IPToKey[found] = pk;
|
||||
found = AllocateNewAddress();
|
||||
if(!m_KeyToIP.emplace(pk, found).second)
|
||||
{
|
||||
llarp::LogError(Name(), "failed to map ", pk, " to ", found);
|
||||
return found;
|
||||
}
|
||||
if(!m_IPToKey.emplace(found, pk).second)
|
||||
{
|
||||
llarp::LogError(Name(), "failed to map ", found, " to ", pk);
|
||||
return found;
|
||||
}
|
||||
if(m_KeyToIP.find(pk) != m_KeyToIP.end())
|
||||
llarp::LogInfo(Name(), " mapping ", pk, " to ", found);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user