From c626dcb50eed496462fd4ac3e05bf79164749ebe Mon Sep 17 00:00:00 2001 From: MeshCollider Date: Sun, 10 Sep 2017 11:19:46 +1200 Subject: Make fUseCrypto atomic --- src/wallet/crypter.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/wallet/crypter.h') 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 + 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 fUseCrypto; //! keeps track of whether Unlock has run a thorough check before bool fDecryptionThoroughlyChecked; -- cgit v1.2.3