mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-07 19:22:17 +01:00
rpc: factor out RpcInterruptionPoint from dumptxoutset
This commit is contained in:
@@ -11,9 +11,9 @@
|
||||
#include <util/strencodings.h>
|
||||
#include <util/system.h>
|
||||
|
||||
#include <boost/signals2/signal.hpp>
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <boost/signals2/signal.hpp>
|
||||
|
||||
#include <memory> // for unique_ptr
|
||||
#include <unordered_map>
|
||||
@@ -309,6 +309,11 @@ bool IsRPCRunning()
|
||||
return g_rpc_running;
|
||||
}
|
||||
|
||||
void RpcInterruptionPoint()
|
||||
{
|
||||
if (!IsRPCRunning()) throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Shutting down");
|
||||
}
|
||||
|
||||
void SetRPCWarmupStatus(const std::string& newStatus)
|
||||
{
|
||||
LOCK(cs_rpcWarmup);
|
||||
|
||||
Reference in New Issue
Block a user