diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2016-09-16 16:45:36 +0200 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2019-01-30 16:26:52 -0500 |
commit | 49d2374acf5845c5f760b5fd241482f292164147 (patch) | |
tree | e063f45b28b8dfef299d92b11ed25fdc3ff43b73 /src/wallet/crypter.cpp | |
parent | a5daf70ffb80c14ddf9f35c638d9e8087d8732e9 (diff) |
[tools] Add wallet inspection and modification tool
This commit adds wallet-tool, a tool for creating and interacting with
wallet files. Original implementation was by Jonas Schnelli
<dev@jonasschnelli.ch> with modifications by John Newbery
<john@johnnewbery.com>
MSVC files were provided by Chun Kuan Lee <ken2812221@gmail.com>:
build: Add MSVC project files for bitcoin-wallet-tool
Diffstat (limited to 'src/wallet/crypter.cpp')
-rw-r--r-- | src/wallet/crypter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp index f5ac6e98b2..1dc78255f6 100644 --- a/src/wallet/crypter.cpp +++ b/src/wallet/crypter.cpp @@ -175,7 +175,7 @@ bool CCryptoKeyStore::Lock() return true; } -bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn) +bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn, bool accept_no_keys) { { LOCK(cs_KeyStore); @@ -204,7 +204,7 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn) LogPrintf("The wallet is probably corrupted: Some keys decrypt but not all.\n"); throw std::runtime_error("Error unlocking wallet: some keys decrypt but not all. Your wallet file may be corrupt."); } - if (keyFail || !keyPass) + if (keyFail || (!keyPass && !accept_no_keys)) return false; vMasterKey = vMasterKeyIn; fDecryptionThoroughlyChecked = true; |