diff options
author | Pavol Rusnak <pavol@rusnak.io> | 2020-07-24 11:03:31 +0200 |
---|---|---|
committer | Pavol Rusnak <pavol@rusnak.io> | 2020-07-24 11:04:48 +0200 |
commit | 8c4129b4540f4f739413ed9a6fbfc78afc252f42 (patch) | |
tree | 1c3755931070a3f1d85cf1df74c7458049e1adea | |
parent | 007e15dcd7f8b42501e31cc36343655c53027077 (diff) |
rpc: reset scantxoutset progress on finish
-rw-r--r-- | src/rpc/blockchain.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 2afc9a3d4a..5188891be8 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -2021,6 +2021,7 @@ public: if (g_scan_in_progress.exchange(true)) { return false; } + CHECK_NONFATAL(g_scan_progress == 0); m_could_reserve = true; return true; } @@ -2028,6 +2029,7 @@ public: ~CoinsViewScanReserver() { if (m_could_reserve) { g_scan_in_progress = false; + g_scan_progress = 0; } } }; @@ -2140,7 +2142,6 @@ UniValue scantxoutset(const JSONRPCRequest& request) std::vector<CTxOut> input_txos; std::map<COutPoint, Coin> coins; g_should_abort_scan = false; - g_scan_progress = 0; int64_t count = 0; std::unique_ptr<CCoinsViewCursor> pcursor; CBlockIndex* tip; |