From 97aad32cfafbab97191a397e1c37cc397a6cb5a7 Mon Sep 17 00:00:00 2001 From: MeshCollider Date: Sun, 10 Sep 2017 11:19:46 +1200 Subject: [PATCH] Make fUseCrypto atomic --- src/crypter.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/crypter.h b/src/crypter.h index 6b610fbe5e402..39d7c6d29fe62 100644 --- a/src/crypter.h +++ b/src/crypter.h @@ -13,6 +13,8 @@ class uint256; +#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; @@ -126,7 +128,7 @@ class CCryptoKeyStore : public CBasicKeyStore private: //! if fUseCrypto is true, mapKeys and mapSaplingSpendingKeys must be empty //! if fUseCrypto is false, vMasterKey must be empty - bool fUseCrypto; + std::atomic fUseCrypto; protected: // TODO: In the future, move this variable to the wallet class directly following upstream's structure.