Improve configuration handling.

- Make VALIDATORS_SITE configurable.
- At bootstrap load validators.txt with out a unl_default entry.
- Always merge in unl_default at start if available.
This commit is contained in:
Arthur Britto
2012-06-18 11:37:09 -07:00
parent 11241b9077
commit ec008fe76d
6 changed files with 45 additions and 21 deletions

View File

@@ -1926,7 +1926,7 @@ Json::Value RPCServer::doUnlList(Json::Value& params)
// Populate the UNL from a local validators.txt file.
Json::Value RPCServer::doUnlLoad(Json::Value& params)
{
if (!theApp->getUNL().nodeLoad())
if (theConfig.UNL_DEFAULT.empty() || !theApp->getUNL().nodeLoad(theConfig.UNL_DEFAULT))
{
return RPCError(rpcLOAD_FAILED);
}