@@ -729,7 +729,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletD
729729
730730 // Write to disk
731731 if (fInsertedNew || fUpdated )
732- if (!wtx. WriteToDisk ( pwalletdb))
732+ if (!pwalletdb-> WriteTx (wtx ))
733733 return false ;
734734
735735 // Break debit/credit balance caches:
@@ -829,7 +829,7 @@ bool CWallet::AbandonTransaction(const uint256& hashTx)
829829 wtx.nIndex = -1 ;
830830 wtx.setAbandoned ();
831831 wtx.MarkDirty ();
832- wtx. WriteToDisk (&walletdb );
832+ walletdb. WriteTx (wtx );
833833 NotifyTransactionChanged (this , wtx.GetHash (), CT_UPDATED);
834834 // Iterate over all its outputs, and mark transactions in the wallet that spend them abandoned too
835835 TxSpends::const_iterator iter = mapTxSpends.lower_bound (COutPoint (hashTx, 0 ));
@@ -891,7 +891,7 @@ void CWallet::MarkConflicted(const uint256& hashBlock, const uint256& hashTx)
891891 wtx.nIndex = -1 ;
892892 wtx.hashBlock = hashBlock;
893893 wtx.MarkDirty ();
894- wtx. WriteToDisk (&walletdb );
894+ walletdb. WriteTx (wtx );
895895 // Iterate over all its outputs, and mark transactions in the wallet that spend them conflicted too
896896 TxSpends::const_iterator iter = mapTxSpends.lower_bound (COutPoint (now, 0 ));
897897 while (iter != mapTxSpends.end () && iter->first .hash == now) {
@@ -1186,12 +1186,6 @@ void CWalletTx::GetAccountAmounts(const string& strAccount, CAmount& nReceived,
11861186 }
11871187}
11881188
1189-
1190- bool CWalletTx::WriteToDisk (CWalletDB *pwalletdb)
1191- {
1192- return pwalletdb->WriteTx (GetHash (), *this );
1193- }
1194-
11951189/* *
11961190 * Scan the block chain (starting in pindexStart) for transactions
11971191 * from or to us. If fUpdate is true, found transactions that already
@@ -3194,7 +3188,7 @@ bool CWallet::InitLoadWallet()
31943188 copyTo->fFromMe = copyFrom->fFromMe ;
31953189 copyTo->strFromAccount = copyFrom->strFromAccount ;
31963190 copyTo->nOrderPos = copyFrom->nOrderPos ;
3197- copyTo-> WriteToDisk (& walletdb);
3191+ walletdb. WriteTx (*copyTo );
31983192 }
31993193 }
32003194 }
0 commit comments