Store a fixed order of transactions (and accounting) in the wallet

For backward compatibility, new accounting data is stored after a \0 in the comment string.
This way, old versions and third-party software should load and store them, but all actual use (listtransactions, for example) ignores it.
This commit is contained in:
Luke Dashjr
2012-05-27 23:06:09 +00:00
parent cf78183fad
commit 9c7722b7c5
6 changed files with 315 additions and 7 deletions

View File

@@ -170,10 +170,14 @@ public:
bool ReadAccount(const std::string& strAccount, CAccount& account);
bool WriteAccount(const std::string& strAccount, const CAccount& account);
private:
bool WriteAccountingEntry(const uint64 nAccEntryNum, const CAccountingEntry& acentry);
public:
bool WriteAccountingEntry(const CAccountingEntry& acentry);
int64 GetAccountCreditDebit(const std::string& strAccount);
void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& acentries);
int ReorderTransactions(CWallet*);
int LoadWallet(CWallet* pwallet);
};