aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/crypter.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-02-06 21:26:55 -0500
committerAndrew Chow <achow101-github@achow101.com>2019-02-10 12:24:53 -0500
commit7687f7873b75c3cbdfa15ab570211dc39d24ab80 (patch)
tree2bbbc90f6c961ae1e6005be6584c63d94d721653 /src/wallet/crypter.cpp
parent5c99bb00470057f573f1d76b76e744a6ccd65b08 (diff)
downloadbitcoin-7687f7873b75c3cbdfa15ab570211dc39d24ab80.tar.xz
[wallet] Support creating a blank wallet
A blank wallet is a wallet that has no keys, script or watch only things. A new wallet flag indicating that it is blank will be set when the wallet is blank. Once it is no longer blank (a seed has been generated, keys or scripts imported, etc), the flag will be unset.
Diffstat (limited to 'src/wallet/crypter.cpp')
-rw-r--r--src/wallet/crypter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp
index 1dc78255f6..a255177e36 100644
--- a/src/wallet/crypter.cpp
+++ b/src/wallet/crypter.cpp
@@ -182,7 +182,7 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn, bool accept_no
if (!SetCrypted())
return false;
- bool keyPass = false;
+ bool keyPass = mapCryptedKeys.empty(); // Always pass when there are no encrypted keys
bool keyFail = false;
CryptedKeyMap::const_iterator mi = mapCryptedKeys.begin();
for (; mi != mapCryptedKeys.end(); ++mi)