Skip to content

Commit 5e155b4

Browse files
committed
Remove unused pwalletdb from CommitTransaction
Coming from btc@5723bb44ce2c6bb14114aa7f211160702a47ac91
1 parent d8cc80a commit 5e155b4

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
@@ -2947,11 +2947,6 @@ CWallet::CommitResult CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey&
29472947
LOCK2(cs_main, cs_wallet);
29482948
LogPrintf("%s:\n%s", __func__, wtxNew.ToString());
29492949
{
2950-
// This is only to keep the database open to defeat the auto-flush for the
2951-
// duration of this scope. This is the only place where this optimization
2952-
// maybe makes sense; please don't do it anywhere else.
2953-
CWalletDB* pwalletdb = fFileBacked ? new CWalletDB(strWalletFile, "r+") : NULL;
2954-
29552950
// Take key pair from key pool so it won't be used again
29562951
reservekey.KeepKey();
29572952

@@ -2972,9 +2967,6 @@ CWallet::CommitResult CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey&
29722967
updated_hashes.insert(txin.prevout.hash);
29732968
}
29742969
}
2975-
2976-
if (fFileBacked)
2977-
delete pwalletdb;
29782970
}
29792971

29802972
res.hashTx = wtxNew.GetHash();

0 commit comments

Comments
 (0)