Improve reporting for bad validators.txt.

This commit is contained in:
Arthur Britto
2012-04-30 13:59:02 -07:00
parent 0ab34eee3d
commit fc2ce4ea35
4 changed files with 15 additions and 6 deletions

View File

@@ -1020,9 +1020,14 @@ int UniqueNodeList::iSourceScore(validatorSource vsWhy)
// Queue a domain for a single attempt fetch a newcoin.txt.
// --> strComment: only used on vsManual
// YYY As a lot of these may happen at once, would be nice to wrap multiple calls in a transaction.
void UniqueNodeList::nodeAddDomain(std::string strDomain, validatorSource vsWhy, std::string strComment)
void UniqueNodeList::nodeAddDomain(const std::string& strDomain, validatorSource vsWhy, std::string strComment)
{
// YYY Would be best to verify strDomain is a valid domain.
// std::cerr << str(boost::format("nodeAddDomain: '%s' %c '%s'")
// % strDomain
// % vsWhy
// % strComment) << std::endl;
seedDomain sdCurrent;
bool bFound = getSeedDomains(strDomain, sdCurrent);
@@ -1211,6 +1216,10 @@ void UniqueNodeList::nodeDefault(std::string strValidators) {
nodeAddDomain(strValidator, vsValidator);
}
}
else
{
std::cerr << "WARNING: '" VALIDATORS_FILE_NAME "' missing [" SECTION_VALIDATORS "]." << std::endl;
}
}
// vim:ts=4