Skip to content

Commit d8e9a2a

Browse files
committed
Remove "rpc" category from GetWarnings
No longer used after removing safe mode. This function can likely be simplified more, but I'll leave that for later to make this easy to review.
1 parent 7da3b0a commit d8e9a2a

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/warnings.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ void SetfLargeWorkInvalidChainFound(bool flag)
4040
std::string GetWarnings(const std::string& strFor)
4141
{
4242
std::string strStatusBar;
43-
std::string strRPC;
4443
std::string strGUI;
4544
const std::string uiAlertSeperator = "<hr />";
4645

@@ -60,21 +59,19 @@ std::string GetWarnings(const std::string& strFor)
6059

6160
if (fLargeWorkForkFound)
6261
{
63-
strStatusBar = strRPC = "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.";
62+
strStatusBar = "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.";
6463
strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.");
6564
}
6665
else if (fLargeWorkInvalidChainFound)
6766
{
68-
strStatusBar = strRPC = "Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.";
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.";
6968
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.");
7069
}
7170

7271
if (strFor == "gui")
7372
return strGUI;
7473
else if (strFor == "statusbar")
7574
return strStatusBar;
76-
else if (strFor == "rpc")
77-
return strRPC;
7875
assert(!"GetWarnings(): invalid parameter");
7976
return "error";
8077
}

src/warnings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ bool GetfLargeWorkForkFound();
1515
void SetfLargeWorkInvalidChainFound(bool flag);
1616
/** Format a string that describes several potential problems detected by the core.
1717
* strFor can have three values:
18-
* - "rpc": get critical warnings, which should put the client in safe mode if non-empty
1918
* - "statusbar": get all warnings
2019
* - "gui": get all warnings, translated (where possible) for GUI
2120
* This function only returns the highest priority warning of the set selected by strFor.

0 commit comments

Comments
 (0)