mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-10 15:46:48 -04:00
15 lines
356 B
C++
15 lines
356 B
C++
![]() |
#include "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);
|
||
|
}
|
||
|
}
|
||
|
|