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.