diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-05-22 15:38:48 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-05-22 15:52:37 -0400 |
commit | fa7fc5a8e0fcf9ca81e84b3631f18ae40502be60 (patch) | |
tree | 422665e4954f8f50a026e4a165ccfc35a72a8d9c /src/rpc/server.cpp | |
parent | b5c423c48e094bd098e11c3d1f57acae7502a4da (diff) | |
download | bitcoin-fa7fc5a8e0fcf9ca81e84b3631f18ae40502be60.tar.xz |
rpc: factor out RpcInterruptionPoint from dumptxoutset
Diffstat (limited to 'src/rpc/server.cpp')
-rw-r--r-- | src/rpc/server.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 219979f095..99c649d15a 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -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); |