Skip to content

Commit 047ea10

Browse files
committed
Make fImporting an std::atomic
1 parent 42071ca commit 047ea10

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int64_t nTimeBestReceived = 0; // Used only to inform the wallet of when we last
6868
CWaitableCriticalSection csBestBlock;
6969
CConditionVariable cvBlockChange;
7070
int nScriptCheckThreads = 0;
71-
bool fImporting = false;
71+
std::atomic_bool fImporting(false);
7272
bool fReindex = false;
7373
bool fTxIndex = false;
7474
bool fHavePruned = false;

src/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ extern uint64_t nLastBlockWeight;
165165
extern const std::string strMessageMagic;
166166
extern CWaitableCriticalSection csBestBlock;
167167
extern CConditionVariable cvBlockChange;
168-
extern bool fImporting;
168+
extern std::atomic_bool fImporting;
169169
extern bool fReindex;
170170
extern int nScriptCheckThreads;
171171
extern bool fTxIndex;

0 commit comments

Comments
 (0)