Make fewer assumptions about config state

This handles values missing when config is created through RouterHive.
pull/1186/head
Stephen Shelton 4 years ago
parent dfcf8fb62e
commit ca24f25665
No known key found for this signature in database
GPG Key ID: EE4BADACCE8B631C

@ -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…
Cancel
Save