Skip to content

Commit

Permalink
Make fUseCrypto atomic
Browse files Browse the repository at this point in the history
  • Loading branch information
meshcollider authored and random-zebra committed Jul 25, 2021
1 parent 2711f78 commit 97aad32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/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 @@ -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<bool> fUseCrypto;

protected:
// TODO: In the future, move this variable to the wallet class directly following upstream's structure.
Expand Down

0 comments on commit 97aad32

Please sign in to comment.