Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/scriptpubkeyman.cpp
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | bool CWallet::Unlock(const CKeyingMaterial &vMasterKeyIn, bool accept_no_keys) { | ||||
keyPass = true; | keyPass = true; | ||||
if (fDecryptionThoroughlyChecked) { | if (fDecryptionThoroughlyChecked) { | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if (keyPass && keyFail) { | if (keyPass && keyFail) { | ||||
LogPrintf("The wallet is probably corrupted: Some keys decrypt but " | LogPrintf("The wallet is probably corrupted: Some keys decrypt but " | ||||
"not all.\n"); | "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 && !accept_no_keys)) { | if (keyFail || (!keyPass && !accept_no_keys)) { | ||||
return false; | return false; | ||||
} | } | ||||
vMasterKey = vMasterKeyIn; | vMasterKey = vMasterKeyIn; | ||||
fDecryptionThoroughlyChecked = true; | fDecryptionThoroughlyChecked = true; | ||||
} | } | ||||
NotifyStatusChanged(this); | NotifyStatusChanged(this); | ||||
▲ Show 20 Lines • Show All 1,241 Lines • Show Last 20 Lines |