aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Strateman <patrick.strateman@gmail.com>2016-06-08 16:20:59 -0700
committerPatrick Strateman <patrick.strateman@gmail.com>2016-07-29 17:04:14 -0700
commit5723bb44ce2c6bb14114aa7f211160702a47ac91 (patch)
tree05bcacc3f3e2b5b3a95842c11fc814aba1eb1208 /src
parent867f842f1e5a385aeb2093f802d6f37a84d0fe5d (diff)
downloadbitcoin-5723bb44ce2c6bb14114aa7f211160702a47ac91.tar.xz
Remove unused pwalletdb from CWallet::AddToWallet
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 63a3baea04..ee9254050c 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2447,11 +2447,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
LOCK2(cs_main, cs_wallet);
LogPrintf("CommitTransaction:\n%s", wtxNew.ToString());
{
- // This is only to keep the database open to defeat the auto-flush for the
- // duration of this scope. This is the only place where this optimization
- // maybe makes sense; please don't do it anywhere else.
- CWalletDB* pwalletdb = fFileBacked ? new CWalletDB(strWalletFile,"r+") : NULL;
-
// Take key pair from key pool so it won't be used again
reservekey.KeepKey();
@@ -2467,9 +2462,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
coin.BindWallet(this);
NotifyTransactionChanged(this, coin.GetHash(), CT_UPDATED);
}
-
- if (fFileBacked)
- delete pwalletdb;
}
// Track how many getdata requests our transaction gets