mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Make fReindex atomic to avoid race
This commit is contained in:
parent
58d91af59e
commit
35aeabec62
2 changed files with 3 additions and 3 deletions
|
|
@ -66,7 +66,7 @@ CWaitableCriticalSection csBestBlock;
|
|||
CConditionVariable cvBlockChange;
|
||||
int nScriptCheckThreads = 0;
|
||||
std::atomic_bool fImporting(false);
|
||||
bool fReindex = false;
|
||||
std::atomic_bool fReindex(false);
|
||||
bool fTxIndex = false;
|
||||
bool fHavePruned = false;
|
||||
bool fPruneMode = false;
|
||||
|
|
@ -3523,7 +3523,7 @@ bool static LoadBlockIndexDB(const CChainParams& chainparams)
|
|||
// Check whether we need to continue reindexing
|
||||
bool fReindexing = false;
|
||||
pblocktree->ReadReindexing(fReindexing);
|
||||
fReindex |= fReindexing;
|
||||
if(fReindexing) fReindex = true;
|
||||
|
||||
// Check whether we have a transaction index
|
||||
pblocktree->ReadFlag("txindex", fTxIndex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue