aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/crypter.cpp
diff options
context:
space:
mode:
authorMeshCollider <dobsonsa68@gmail.com>2018-10-13 16:57:15 +0900
committerMeshCollider <dobsonsa68@gmail.com>2018-11-10 15:07:20 +1300
commitb4f6e58ca5a74225b6db9deb3ffe1ce3ab19a790 (patch)
tree5dc42277768cbbac45dda89a88e58145da9348f0 /src/wallet/crypter.cpp
parentbe992701b018f256db6d64786624be4cb60d8975 (diff)
downloadbitcoin-b4f6e58ca5a74225b6db9deb3ffe1ce3ab19a790.tar.xz
Better error message for user when corrupt wallet unlock fails
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 729e4e39b0..175cf1c0a4 100644
--- a/src/wallet/crypter.cpp
+++ b/src/wallet/crypter.cpp
@@ -202,7 +202,7 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn)
if (keyPass && keyFail)
{
LogPrintf("The wallet is probably corrupted: Some keys decrypt but not all.\n");
- assert(false);
+ throw std::runtime_error("Error unlocking wallet: some keys decrypt but not all. Your wallet file may be corrupt.");
}
if (keyFail || !keyPass)
return false;