diff options
| author | Jeff Garzik <[email protected]> | 2013-05-30 08:01:22 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2013-05-30 08:01:22 -0700 |
| commit | 9c95a2e836f7f92b6e446e4dfd3362aa7274bec9 (patch) | |
| tree | 3628dc2161b3fd447d23753b0b51892a5900be4f /src/wallet.cpp | |
| parent | Merge pull request #2600 from sipa/keyrefactor (diff) | |
| parent | Use boost::asio::deadline_timer for walletpassphrase timeout (diff) | |
| download | discoin-9c95a2e836f7f92b6e446e4dfd3362aa7274bec9.tar.xz discoin-9c95a2e836f7f92b6e446e4dfd3362aa7274bec9.zip | |
Merge pull request #2625 from gavinandresen/walletlock_asio
Use boost::asio::deadline_timer for walletpassphrase timeout
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 5efc45583..b49f69097 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -89,9 +89,6 @@ bool CWallet::AddCScript(const CScript& redeemScript) bool CWallet::Unlock(const SecureString& strWalletPassphrase) { - if (!IsLocked()) - return false; - CCrypter crypter; CKeyingMaterial vMasterKey; @@ -102,7 +99,7 @@ bool CWallet::Unlock(const SecureString& strWalletPassphrase) if(!crypter.SetKeyFromPassphrase(strWalletPassphrase, pMasterKey.second.vchSalt, pMasterKey.second.nDeriveIterations, pMasterKey.second.nDerivationMethod)) return false; if (!crypter.Decrypt(pMasterKey.second.vchCryptedKey, vMasterKey)) - return false; + continue; // try another master key if (CCryptoKeyStore::Unlock(vMasterKey)) return true; } |