Init key manager before InitOutboundLinks are configured

pull/942/head
Stephen Shelton 5 years ago
parent e558a1fa1b
commit 23fc2ad042

@ -131,16 +131,6 @@ namespace llarp
return m_transportKey;
}
bool
KeyManager::getRouterContact(llarp::RouterContact& rc) const
{
if (! m_initialized)
return false;
rc = m_rc;
return true;
}
bool
KeyManager::backupKeyFilesByMoving() const
{

@ -75,7 +75,6 @@ namespace llarp
std::string m_lokidRPCUser;
std::string m_lokidRPCPassword;
llarp::RouterContact m_rc;
llarp::SecretKey m_idKey;
llarp::SecretKey m_encKey;
llarp::SecretKey m_transportKey;

@ -231,13 +231,13 @@ namespace llarp
}
_nodedb = nodedb;
if(!FromConfig(conf))
if (not m_keyManager->initialize(*conf, true))
return false;
if(!InitOutboundLinks())
if(!FromConfig(conf))
return false;
if (not m_keyManager->initialize(*conf, true))
if(!InitOutboundLinks())
return false;
return EnsureIdentity();

Loading…
Cancel
Save