Skip to content

Commit 5723bb4

Browse files
committed
Remove unused pwalletdb from CWallet::AddToWallet
1 parent 867f842 commit 5723bb4

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/wallet/wallet.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2447,11 +2447,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
24472447
LOCK2(cs_main, cs_wallet);
24482448
LogPrintf("CommitTransaction:\n%s", wtxNew.ToString());
24492449
{
2450-
// This is only to keep the database open to defeat the auto-flush for the
2451-
// duration of this scope. This is the only place where this optimization
2452-
// maybe makes sense; please don't do it anywhere else.
2453-
CWalletDB* pwalletdb = fFileBacked ? new CWalletDB(strWalletFile,"r+") : NULL;
2454-
24552450
// Take key pair from key pool so it won't be used again
24562451
reservekey.KeepKey();
24572452

@@ -2467,9 +2462,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
24672462
coin.BindWallet(this);
24682463
NotifyTransactionChanged(this, coin.GetHash(), CT_UPDATED);
24692464
}
2470-
2471-
if (fFileBacked)
2472-
delete pwalletdb;
24732465
}
24742466

24752467
// Track how many getdata requests our transaction gets

0 commit comments

Comments
 (0)