From fa7fc5a8e0fcf9ca81e84b3631f18ae40502be60 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Fri, 22 May 2020 15:38:48 -0400 Subject: rpc: factor out RpcInterruptionPoint from dumptxoutset --- src/rpc/blockchain.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/rpc/blockchain.cpp') 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; -- cgit v1.2.3