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

PARTIAL, since d68dcf7 isn't backported (yet)
This commit is contained in:
Jeff Garzik
2012-05-18 00:03:32 +00:00
committed by Luke Dashjr
parent c455aec699
commit 738592a002
3 changed files with 11 additions and 5 deletions
+2 -1
View File
@@ -165,7 +165,8 @@ bool CWallet::EncryptWallet(const string& strWalletPassphrase)
if (fFileBacked)
{
pwalletdbEncryption = new CWalletDB(strWalletFile);
pwalletdbEncryption->TxnBegin();
if (!pwalletdbEncryption->TxnBegin())
return false;
pwalletdbEncryption->WriteMasterKey(nMasterKeyMaxID, kMasterKey);
}