Skip to content

Commit

Permalink
Make fUseCrypto atomic
Browse files Browse the repository at this point in the history
zcash: cherry picked from commit c626dcb
zcash: bitcoin/bitcoin#11107
  • Loading branch information
meshcollider authored and LarryRuane committed Apr 12, 2021
1 parent 2fd8809 commit ea9bcc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wallet/crypter.h
Expand Up @@ -13,6 +13,8 @@

class uint256;

#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;
Expand Down Expand Up @@ -138,7 +140,7 @@ class CCryptoKeyStore : public CBasicKeyStore

//! if fUseCrypto is true, mapKeys, mapSproutSpendingKeys, and mapSaplingSpendingKeys 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;
Expand Down

0 comments on commit ea9bcc4

Please sign in to comment.