|
|
@ -2447,11 +2447,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey) |
|
|
|
LOCK2(cs_main, cs_wallet); |
|
|
|
LOCK2(cs_main, cs_wallet); |
|
|
|
LogPrintf("CommitTransaction:\n%s", wtxNew.ToString()); |
|
|
|
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
|
|
|
|
// Take key pair from key pool so it won't be used again
|
|
|
|
reservekey.KeepKey(); |
|
|
|
reservekey.KeepKey(); |
|
|
|
|
|
|
|
|
|
|
@ -2467,9 +2462,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey) |
|
|
|
coin.BindWallet(this); |
|
|
|
coin.BindWallet(this); |
|
|
|
NotifyTransactionChanged(this, coin.GetHash(), CT_UPDATED); |
|
|
|
NotifyTransactionChanged(this, coin.GetHash(), CT_UPDATED); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (fFileBacked) |
|
|
|
|
|
|
|
delete pwalletdb; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Track how many getdata requests our transaction gets
|
|
|
|
// Track how many getdata requests our transaction gets
|
|
|
|