Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/walletdb.cpp
Show First 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | bool WalletBatch::WriteAccount(const std::string &strAccount, | ||||
const CAccount &account) { | const CAccount &account) { | ||||
return WriteIC(std::make_pair(std::string("acc"), strAccount), account); | return WriteIC(std::make_pair(std::string("acc"), strAccount), account); | ||||
} | } | ||||
bool WalletBatch::EraseAccount(const std::string &strAccount) { | bool WalletBatch::EraseAccount(const std::string &strAccount) { | ||||
return EraseIC(std::make_pair(std::string("acc"), strAccount)); | return EraseIC(std::make_pair(std::string("acc"), strAccount)); | ||||
} | } | ||||
bool WalletBatch::WriteAccountingEntry(const uint64_t nAccEntryNum, | |||||
const CAccountingEntry &acentry) { | |||||
return WriteIC( | |||||
std::make_pair(std::string("acentry"), | |||||
std::make_pair(acentry.strAccount, nAccEntryNum)), | |||||
acentry); | |||||
} | |||||
void WalletBatch::ListAccountCreditDebit(const std::string &strAccount, | void WalletBatch::ListAccountCreditDebit(const std::string &strAccount, | ||||
std::list<CAccountingEntry> &entries) { | std::list<CAccountingEntry> &entries) { | ||||
bool fAllAccounts = (strAccount == "*"); | bool fAllAccounts = (strAccount == "*"); | ||||
Dbc *pcursor = m_batch.GetCursor(); | Dbc *pcursor = m_batch.GetCursor(); | ||||
if (!pcursor) { | if (!pcursor) { | ||||
throw std::runtime_error(std::string(__func__) + | throw std::runtime_error(std::string(__func__) + | ||||
": cannot create DB cursor"); | ": cannot create DB cursor"); | ||||
▲ Show 20 Lines • Show All 690 Lines • Show Last 20 Lines |