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

PARTIAL, since d68dcf7 isn't backported (yet)
This commit is contained in:
Jeff Garzik
2012-05-14 01:11:11 -04:00
committed by Luke Dashjr
parent c455aec699
commit 738592a002
3 changed files with 11 additions and 5 deletions

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);
}