mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 06:52:36 +01:00
rpc: reset scantxoutset progress on finish
This commit is contained in:
parent
007e15dcd7
commit
8c4129b454
1 changed files with 2 additions and 1 deletions
|
@ -2021,6 +2021,7 @@ public:
|
||||||
if (g_scan_in_progress.exchange(true)) {
|
if (g_scan_in_progress.exchange(true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
CHECK_NONFATAL(g_scan_progress == 0);
|
||||||
m_could_reserve = true;
|
m_could_reserve = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2028,6 +2029,7 @@ public:
|
||||||
~CoinsViewScanReserver() {
|
~CoinsViewScanReserver() {
|
||||||
if (m_could_reserve) {
|
if (m_could_reserve) {
|
||||||
g_scan_in_progress = false;
|
g_scan_in_progress = false;
|
||||||
|
g_scan_progress = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2140,7 +2142,6 @@ UniValue scantxoutset(const JSONRPCRequest& request)
|
||||||
std::vector<CTxOut> input_txos;
|
std::vector<CTxOut> input_txos;
|
||||||
std::map<COutPoint, Coin> coins;
|
std::map<COutPoint, Coin> coins;
|
||||||
g_should_abort_scan = false;
|
g_should_abort_scan = false;
|
||||||
g_scan_progress = 0;
|
|
||||||
int64_t count = 0;
|
int64_t count = 0;
|
||||||
std::unique_ptr<CCoinsViewCursor> pcursor;
|
std::unique_ptr<CCoinsViewCursor> pcursor;
|
||||||
CBlockIndex* tip;
|
CBlockIndex* tip;
|
||||||
|
|
Loading…
Add table
Reference in a new issue