Always check return values of TxnBegin() and TxnCommit()

This commit is contained in:
Jeff Garzik
2012-05-14 01:11:11 -04:00
committed by Jeff Garzik
parent 09b4e26a44
commit 0fb78eae34
3 changed files with 15 additions and 6 deletions

View File

@@ -242,7 +242,8 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
if (fFileBacked)
{
pwalletdbEncryption = new CWalletDB(strWalletFile);
pwalletdbEncryption->TxnBegin();
if (!pwalletdbEncryption->TxnBegin())
return false;
pwalletdbEncryption->WriteMasterKey(nMasterKeyMaxID, kMasterKey);
}