aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/crypter.h
diff options
context:
space:
mode:
authorMeshCollider <dobsonsa68@gmail.com>2017-09-10 11:19:46 +1200
committerMeshCollider <dobsonsa68@gmail.com>2017-09-10 11:29:08 +1200
commitc626dcb50eed496462fd4ac3e05bf79164749ebe (patch)
tree6c499463063a9b5c2696f1e3b4f7c0019ddb7492 /src/wallet/crypter.h
parent731065b114452ff770320d09639448b3c9a74b0a (diff)
Make fUseCrypto atomic
Diffstat (limited to 'src/wallet/crypter.h')
-rw-r--r--src/wallet/crypter.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h
index f1e8a25650..0948de42ef 100644
--- a/src/wallet/crypter.h
+++ b/src/wallet/crypter.h
@@ -9,6 +9,8 @@
#include "serialize.h"
#include "support/allocators/secure.h"
+#include <atomic>
+
const unsigned int WALLET_CRYPTO_KEY_SIZE = 32;
const unsigned int WALLET_CRYPTO_SALT_SIZE = 8;
const unsigned int WALLET_CRYPTO_IV_SIZE = 16;
@@ -118,7 +120,7 @@ private:
//! if fUseCrypto is true, mapKeys must be empty
//! if fUseCrypto is false, vMasterKey must be empty
- bool fUseCrypto;
+ std::atomic<bool> fUseCrypto;
//! keeps track of whether Unlock has run a thorough check before
bool fDecryptionThoroughlyChecked;