new safety feature displays a warning message and locks down RPC if it detects a problem that may require an upgrade

-- version 0.3.8

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@122 1a98c847-1fd6-4fd8-948a-caf3550aa51b
This commit is contained in:
s_nakamoto
2010-08-03 18:25:05 +00:00
parent 6ff5f718b6
commit 2c06be915d
8 changed files with 81 additions and 34 deletions

View File

@@ -946,6 +946,10 @@ void ThreadRPCServer2(void* parg)
printf("ThreadRPCServer method=%s\n", strMethod.c_str());
// Observe lockdown
if (IsLockdown() && strMethod != "help" && strMethod != "stop" && strMethod != "getgenerate" && strMethod != "setgenerate")
throw runtime_error("WARNING: Displayed transactions may not be correct! You may need to upgrade.");
// Execute
map<string, rpcfn_type>::iterator mi = mapCallTable.find(strMethod);
if (mi == mapCallTable.end())