| 38 | } |
| 39 | |
| 40 | std::string GetWarnings(const std::string& strFor) |
| 41 | { |
| 42 | std::string strStatusBar; |
| 43 | std::string strGUI; |
| 44 | const std::string uiAlertSeperator = "<hr />"; |
| 45 | |
| 46 | LOCK(cs_warnings); |
| 47 | |
| 48 | if (!CLIENT_VERSION_IS_RELEASE) { |
| 49 | strStatusBar = "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"; |
| 50 | strGUI = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"); |
| 51 | } |
| 52 | |
| 53 | // Misc warnings like out of disk space and clock is wrong |
| 54 | if (strMiscWarning != "") |
| 55 | { |
| 56 | strStatusBar = strMiscWarning; |
| 57 | strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + strMiscWarning; |
| 58 | } |
| 59 | |
| 60 | if (fLargeWorkForkFound) |
| 61 | { |
| 62 | strStatusBar = "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."; |
| 63 | strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."); |
| 64 | } |
| 65 | else if (fLargeWorkInvalidChainFound) |
| 66 | { |
| 67 | strStatusBar = "Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."; |
| 68 | strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."); |
| 69 | } |
| 70 | |
| 71 | if (strFor == "gui") |
| 72 | return strGUI; |
| 73 | else if (strFor == "statusbar") |
| 74 | return strStatusBar; |
| 75 | assert(!"GetWarnings(): invalid parameter"); |
| 76 | return "error"; |
| 77 | } |
no test coverage detected