aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2012-05-14 01:11:11 -0400
committerLuke Dashjr <[email protected]>2012-05-18 00:03:32 +0000
commit738592a002003246849e4b3102aebdab738e976a (patch)
treef4923bf5b3417bb88a07d3a55fa5c9f2a1f16087 /src/wallet.cpp
parentHopefully final fix for the stuck blockchain issue (diff)
downloaddiscoin-738592a002003246849e4b3102aebdab738e976a.tar.xz
discoin-738592a002003246849e4b3102aebdab738e976a.zip
Always check return values of TxnBegin() and TxnCommit()
PARTIAL, since d68dcf7 isn't backported (yet)
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 b3eb06a3f..6bf8e582f 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -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);
}