mirror of https://github.com/oxen-io/lokinet
Make fewer assumptions about config state
This handles values missing when config is created through RouterHive.
This commit is contained in:
parent
dfcf8fb62e
commit
ca24f25665
|
@ -457,7 +457,7 @@ namespace llarp
|
|||
|
||||
// if our conf had no bootstrap files specified, try the default location of
|
||||
// <DATA_DIR>/bootstrap.signed. If this isn't present, leave a useful error message
|
||||
if (configRouters.size() == 0)
|
||||
if (configRouters.size() == 0 and not m_isServiceNode)
|
||||
{
|
||||
// TODO: use constant
|
||||
fs::path defaultBootstrapFile = conf->router.m_dataDir / "bootstrap.signed";
|
||||
|
|
|
@ -108,7 +108,7 @@ namespace llarp
|
|||
nodeName = nickname;
|
||||
|
||||
FILE* logfile = nullptr;
|
||||
if (file == "stdout")
|
||||
if (file == "stdout" or file.empty())
|
||||
{
|
||||
logfile = stdout;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ namespace llarp
|
|||
switch (type)
|
||||
{
|
||||
case LogType::Unknown:
|
||||
throw std::invalid_argument("Cannot use LogType::Unknown");
|
||||
// tolerate as fallback to LogType::File
|
||||
|
||||
case LogType::File:
|
||||
if (logfile != stdout)
|
||||
|
|
Loading…
Reference in New Issue