aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-05-22 15:38:48 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-05-22 15:52:37 -0400
commitfa7fc5a8e0fcf9ca81e84b3631f18ae40502be60 (patch)
tree422665e4954f8f50a026e4a165ccfc35a72a8d9c /src/rpc/blockchain.cpp
parentb5c423c48e094bd098e11c3d1f57acae7502a4da (diff)
downloadbitcoin-fa7fc5a8e0fcf9ca81e84b3631f18ae40502be60.tar.xz
rpc: factor out RpcInterruptionPoint from dumptxoutset
Diffstat (limited to 'src/rpc/blockchain.cpp')
-rw-r--r--src/rpc/blockchain.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index ac567e16ce..80ae35f48e 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -2329,9 +2329,7 @@ UniValue dumptxoutset(const JSONRPCRequest& request)
unsigned int iter{0};
while (pcursor->Valid()) {
- if (iter % 5000 == 0 && !IsRPCRunning()) {
- throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Shutting down");
- }
+ if (iter % 5000 == 0) RpcInterruptionPoint();
++iter;
if (pcursor->GetKey(key) && pcursor->GetValue(coin)) {
afile << key;