mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Reintroduce Clang-Format & Levelization (#171)
* clang-format * levelization * clang-format * update workflow (#172) * update workflow * Update build-in-docker.yml * fix from `clang-format` * Update Enum.h
This commit is contained in:
@@ -902,9 +902,10 @@ Config::loadFromString(std::string const& fileContents)
|
||||
}
|
||||
|
||||
auto iniFile = parseIniFile(data, true);
|
||||
|
||||
|
||||
if (auto importKeys =
|
||||
getIniFileSection(iniFile, SECTION_IMPORT_VL_KEYS); importKeys)
|
||||
getIniFileSection(iniFile, SECTION_IMPORT_VL_KEYS);
|
||||
importKeys)
|
||||
{
|
||||
for (std::string const& strPk : *importKeys)
|
||||
{
|
||||
@@ -912,19 +913,19 @@ Config::loadFromString(std::string const& fileContents)
|
||||
if (!pkHex)
|
||||
Throw<std::runtime_error>(
|
||||
"Import VL Key '" + strPk + "' was not valid hex.");
|
||||
|
||||
|
||||
auto const pkType = publicKeyType(makeSlice(*pkHex));
|
||||
if (!pkType)
|
||||
Throw<std::runtime_error>(
|
||||
"Import VL Key '" + strPk + "' was not a valid key type.");
|
||||
IMPORT_VL_KEYS.emplace(strPk, makeSlice(*pkHex));
|
||||
"Import VL Key '" + strPk +
|
||||
"' was not a valid key type.");
|
||||
IMPORT_VL_KEYS.emplace(strPk, makeSlice(*pkHex));
|
||||
}
|
||||
}
|
||||
|
||||
if (RUN_STANDALONE)
|
||||
break;
|
||||
|
||||
|
||||
auto entries = getIniFileSection(iniFile, SECTION_VALIDATORS);
|
||||
|
||||
if (entries)
|
||||
@@ -948,8 +949,6 @@ Config::loadFromString(std::string const& fileContents)
|
||||
if (valListKeys)
|
||||
section(SECTION_VALIDATOR_LIST_KEYS).append(*valListKeys);
|
||||
|
||||
|
||||
|
||||
if (!entries && !valKeyEntries && !valListKeys)
|
||||
Throw<std::runtime_error>(
|
||||
"The file specified in [" SECTION_VALIDATORS_FILE
|
||||
@@ -964,7 +963,6 @@ Config::loadFromString(std::string const& fileContents)
|
||||
validatorsFile.string());
|
||||
}
|
||||
|
||||
|
||||
// Consolidate [validator_keys] and [validators]
|
||||
section(SECTION_VALIDATORS)
|
||||
.append(section(SECTION_VALIDATOR_KEYS).lines());
|
||||
|
||||
Reference in New Issue
Block a user