Changeset View
Changeset View
Standalone View
Standalone View
src/warnings.cpp
Show All 40 Lines | std::string GetWarnings(const std::string &strFor) { | ||||
const std::string uiAlertSeperator = "<hr />"; | const std::string uiAlertSeperator = "<hr />"; | ||||
LOCK(cs_warnings); | LOCK(cs_warnings); | ||||
if (!CLIENT_VERSION_IS_RELEASE) { | if (!CLIENT_VERSION_IS_RELEASE) { | ||||
strStatusBar = "This is a pre-release test build - use at your own " | strStatusBar = "This is a pre-release test build - use at your own " | ||||
"risk - do not use for mining or merchant applications"; | "risk - do not use for mining or merchant applications"; | ||||
strGUI = _("This is a pre-release test build - use at your own risk - " | strGUI = _("This is a pre-release test build - use at your own risk - " | ||||
"do not use for mining or merchant applications"); | "do not use for mining or merchant applications") | ||||
.translated; | |||||
} | } | ||||
// Misc warnings like out of disk space and clock is wrong | // Misc warnings like out of disk space and clock is wrong | ||||
if (strMiscWarning != "") { | if (strMiscWarning != "") { | ||||
strStatusBar = strMiscWarning; | strStatusBar = strMiscWarning; | ||||
strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + strMiscWarning; | strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + strMiscWarning; | ||||
} | } | ||||
if (fLargeWorkForkFound) { | if (fLargeWorkForkFound) { | ||||
strStatusBar = "Warning: The network does not appear to fully agree! " | strStatusBar = "Warning: The network does not appear to fully agree! " | ||||
"Some miners appear to be experiencing issues."; | "Some miners appear to be experiencing issues."; | ||||
strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + | strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + | ||||
_("Warning: The network does not appear to fully agree! Some " | _("Warning: The network does not appear to fully agree! Some " | ||||
"miners appear to be experiencing issues."); | "miners appear to be experiencing issues.") | ||||
.translated; | |||||
} else if (fLargeWorkInvalidChainFound) { | } else if (fLargeWorkInvalidChainFound) { | ||||
strStatusBar = "Warning: We do not appear to fully agree with our " | strStatusBar = "Warning: We do not appear to fully agree with our " | ||||
"peers! You may need to upgrade, or other nodes may " | "peers! You may need to upgrade, or other nodes may " | ||||
"need to upgrade."; | "need to upgrade."; | ||||
strGUI += | strGUI += | ||||
(strGUI.empty() ? "" : uiAlertSeperator) + | (strGUI.empty() ? "" : uiAlertSeperator) + | ||||
_("Warning: We do not appear to fully agree with our peers! You " | _("Warning: We do not appear to fully agree with our peers! You " | ||||
"may need to upgrade, or other nodes may need to upgrade."); | "may need to upgrade, or other nodes may need to upgrade.") | ||||
.translated; | |||||
} | } | ||||
if (strFor == "gui") { | if (strFor == "gui") { | ||||
return strGUI; | return strGUI; | ||||
} else if (strFor == "statusbar") { | } else if (strFor == "statusbar") { | ||||
return strStatusBar; | return strStatusBar; | ||||
} | } | ||||
assert(!"GetWarnings(): invalid parameter"); | assert(!"GetWarnings(): invalid parameter"); | ||||
return "error"; | return "error"; | ||||
} | } |