diff options
author | Pavol Rusnak <pavol@rusnak.io> | 2020-07-24 11:03:31 +0200 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-07-29 16:02:26 +0800 |
commit | 080b47d9ce6288e1725857b3026291981ef75e34 (patch) | |
tree | a33052e9bbea7b379b4e906c45f30cf0c2cc4aa6 /src/rpc/blockchain.cpp | |
parent | 997e528a34185c68665d10cef43da883934ea03a (diff) | |
download | bitcoin-080b47d9ce6288e1725857b3026291981ef75e34.tar.xz |
rpc: reset scantxoutset progress on finish
Github-Pull: #19362
Rebased-From: 8c4129b4540f4f739413ed9a6fbfc78afc252f42
Diffstat (limited to 'src/rpc/blockchain.cpp')
-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 90cf8d6d14..509107d88a 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -2109,6 +2109,7 @@ public: if (g_scan_in_progress.exchange(true)) { return false; } + CHECK_NONFATAL(g_scan_progress == 0); m_could_reserve = true; return true; } @@ -2116,6 +2117,7 @@ public: ~CoinsViewScanReserver() { if (m_could_reserve) { g_scan_in_progress = false; + g_scan_progress = 0; } } }; @@ -2228,7 +2230,6 @@ static RPCHelpMan scantxoutset() 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; |