blob: 9f3a9d30b8533a7ee58b9cc87f3b22671def247c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include <rpc/safemode.h>
#include <rpc/protocol.h>
#include <util.h>
#include <warnings.h>
void ObserveSafeMode()
{
std::string warning = GetWarnings("rpc");
if (warning != "" && !gArgs.GetBoolArg("-disablesafemode", DEFAULT_DISABLE_SAFEMODE)) {
throw JSONRPCError(RPC_FORBIDDEN_BY_SAFE_MODE, std::string("Safe mode: ") + warning);
}
}
|