aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2012-05-14 01:11:11 -0400
committerJeff Garzik <[email protected]>2012-05-14 01:11:11 -0400
commit0fb78eae34b870b9e5b942095d340f2aae49cd60 (patch)
treee572b79b017afe24d74fdbb89b0ee3f5fe635833 /src/wallet.cpp
parentReally do not consider blocked networks local (diff)
downloaddiscoin-0fb78eae34b870b9e5b942095d340f2aae49cd60.tar.xz
discoin-0fb78eae34b870b9e5b942095d340f2aae49cd60.zip
Always check return values of TxnBegin() and TxnCommit()
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r--src/wallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 998909897..96dc986ed 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -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);
}