mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Merge bitcoin/bitcoin#22580: [0.21] Backport: Reset scantxoutset progress before inferring descriptors
080b47d9ce
rpc: reset scantxoutset progress on finish (Pavol Rusnak) Pull request description: Backport of #19362. ACKs for top commit: achow101: Code Review ACK080b47d9ce
Tree-SHA512: 1f58965393663bfc0796fc06ef846bc87521d04d79c2a62227acf4d466de649db7d244c8992a32aa1086e6bf0ac92fb8a5aeadf4673441fefa505e40c02d5daf
This commit is contained in:
commit
52778f4245
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue