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

This commit is contained in:
Jeff Garzik
2012-05-18 00:04:18 +00:00
committed by Luke Dashjr
parent 0d174e130b
commit 3a05f1d2ce
3 changed files with 15 additions and 6 deletions
+2 -1
View File
@@ -234,7 +234,8 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
if (fFileBacked)
{
pwalletdbEncryption = new CWalletDB(strWalletFile);
pwalletdbEncryption->TxnBegin();
if (!pwalletdbEncryption->TxnBegin())
return false;
pwalletdbEncryption->WriteMasterKey(nMasterKeyMaxID, kMasterKey);
}