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/wallet.cpp | |
parent | a5daf70ffb80c14ddf9f35c638d9e8087d8732e9 (diff) | |
download | bitcoin-49d2374acf5845c5f760b5fd241482f292164147.tar.xz |
[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/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 098055673b..154ae2d51f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -398,7 +398,7 @@ bool CWallet::LoadWatchOnly(const CScript &dest) return CCryptoKeyStore::AddWatchOnly(dest); } -bool CWallet::Unlock(const SecureString& strWalletPassphrase) +bool CWallet::Unlock(const SecureString& strWalletPassphrase, bool accept_no_keys) { CCrypter crypter; CKeyingMaterial _vMasterKey; @@ -411,7 +411,7 @@ bool CWallet::Unlock(const SecureString& strWalletPassphrase) return false; if (!crypter.Decrypt(pMasterKey.second.vchCryptedKey, _vMasterKey)) continue; // try another master key - if (CCryptoKeyStore::Unlock(_vMasterKey)) + if (CCryptoKeyStore::Unlock(_vMasterKey, accept_no_keys)) return true; } } |