File tree Expand file tree Collapse file tree 2 files changed +0
-45
lines changed
Expand file tree Collapse file tree 2 files changed +0
-45
lines changed Original file line number Diff line number Diff line change @@ -166,49 +166,6 @@ bool WalletBatch::EraseAccount(const std::string& strAccount)
166166 return EraseIC (std::make_pair (std::string (" acc" ), strAccount));
167167}
168168
169- void WalletBatch::ListAccountCreditDebit (const std::string& strAccount, std::list<CAccountingEntry>& entries)
170- {
171- bool fAllAccounts = (strAccount == " *" );
172-
173- Dbc* pcursor = m_batch.GetCursor ();
174- if (!pcursor)
175- throw std::runtime_error (std::string (__func__) + " : cannot create DB cursor" );
176- bool setRange = true ;
177- while (true )
178- {
179- // Read next record
180- CDataStream ssKey (SER_DISK, CLIENT_VERSION);
181- if (setRange)
182- ssKey << std::make_pair (std::string (" acentry" ), std::make_pair ((fAllAccounts ? std::string (" " ) : strAccount), uint64_t (0 )));
183- CDataStream ssValue (SER_DISK, CLIENT_VERSION);
184- int ret = m_batch.ReadAtCursor (pcursor, ssKey, ssValue, setRange);
185- setRange = false ;
186- if (ret == DB_NOTFOUND)
187- break ;
188- else if (ret != 0 )
189- {
190- pcursor->close ();
191- throw std::runtime_error (std::string (__func__) + " : error scanning DB" );
192- }
193-
194- // Unserialize
195- std::string strType;
196- ssKey >> strType;
197- if (strType != " acentry" )
198- break ;
199- CAccountingEntry acentry;
200- ssKey >> acentry.strAccount ;
201- if (!fAllAccounts && acentry.strAccount != strAccount)
202- break ;
203-
204- ssValue >> acentry;
205- ssKey >> acentry.nEntryNo ;
206- entries.push_back (acentry);
207- }
208-
209- pcursor->close ();
210- }
211-
212169class CWalletScanState {
213170public:
214171 unsigned int nKeys;
Original file line number Diff line number Diff line change @@ -208,8 +208,6 @@ class WalletBatch
208208 // / Erase destination data tuple from wallet database
209209 bool EraseDestData (const std::string &address, const std::string &key);
210210
211- void ListAccountCreditDebit (const std::string& strAccount, std::list<CAccountingEntry>& acentries);
212-
213211 DBErrors LoadWallet (CWallet* pwallet);
214212 DBErrors FindWalletTx (std::vector<uint256>& vTxHash, std::vector<CWalletTx>& vWtx);
215213 DBErrors ZapWalletTx (std::vector<CWalletTx>& vWtx);
You can’t perform that action at this time.
0 commit comments