aboutsummaryrefslogtreecommitdiff
path: root/rpc.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-25 00:05:37 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-25 00:05:37 +0000
commit401926283a200994ecd7df8eae8ced8e0b067c46 (patch)
tree4b3e85c5afc7886f1d1461bee0d075db4daaec6f /rpc.cpp
parent2201a0808ea240617a66823f98dda3433d2546b0 (diff)
alert system
-- version 0.3.11 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@142 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'rpc.cpp')
-rw-r--r--rpc.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/rpc.cpp b/rpc.cpp
index a93a6bcff1..541a8b874c 100644
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -247,7 +247,7 @@ Value getinfo(const Array& params, bool fHelp)
obj.push_back(Pair("genproclimit", (int)(fLimitProcessors ? nLimitProcessors : -1)));
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
obj.push_back(Pair("hashespersec", gethashespersec(params, false)));
- obj.push_back(Pair("status", strWarning));
+ obj.push_back(Pair("errors", GetWarnings("statusbar")));
return obj;
}
@@ -975,8 +975,9 @@ void ThreadRPCServer2(void* parg)
printf("ThreadRPCServer method=%s\n", strMethod.c_str());
// Observe lockdown
- if (IsLockdown() && !mapArgs.count("-overridesafety") && strMethod != "help" && strMethod != "stop" && strMethod != "getgenerate" && strMethod != "setgenerate")
- throw runtime_error("WARNING: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.");
+ string strWarning = GetWarnings("rpc");
+ if (strWarning != "" && !mapArgs.count("-overridesafety") && strMethod != "getinfo" && strMethod != "help" && strMethod != "stop" && strMethod != "getgenerate" && strMethod != "setgenerate")
+ throw runtime_error(strWarning);
// Execute
map<string, rpcfn_type>::iterator mi = mapCallTable.find(strMethod);