Merge 3e306ee1d5 into merged_master (Bitcoin PR bitcoin/bitcoin#19362)

This commit is contained in:
Andrew Poelstra 2021-07-29 04:43:41 +00:00
commit 62fd272e28

View file

@ -2410,6 +2410,7 @@ public:
if (g_scan_in_progress.exchange(true)) {
return false;
}
CHECK_NONFATAL(g_scan_progress == 0);
m_could_reserve = true;
return true;
}
@ -2417,6 +2418,7 @@ public:
~CoinsViewScanReserver() {
if (m_could_reserve) {
g_scan_in_progress = false;
g_scan_progress = 0;
}
}
};
@ -2535,7 +2537,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;