mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Bugfix: Require OrderedTxItems to provide properly scoped accounting entry list
OrderedTxItems returns a multimap of pointers, but needs a place to store the actual CAccountingEntries it points to. It had been using a stack item, which was clobbered as soon as it returned, resulting in undefined behaviour. This fixes at least bug #1768.
This commit is contained in:
@@ -146,7 +146,12 @@ public:
|
||||
|
||||
typedef std::pair<CWalletTx*, CAccountingEntry*> TxPair;
|
||||
typedef std::multimap<int64, TxPair > TxItems;
|
||||
TxItems OrderedTxItems(std::string strAccount = "");
|
||||
|
||||
/** Get the wallet's activity log
|
||||
@return multimap of ordered transactions and accounting entries
|
||||
@warning Returned pointers are *only* valid within the scope of passed acentries
|
||||
*/
|
||||
TxItems OrderedTxItems(std::list<CAccountingEntry>& acentries, std::string strAccount = "");
|
||||
|
||||
void MarkDirty();
|
||||
bool AddToWallet(const CWalletTx& wtxIn);
|
||||
|
||||
Reference in New Issue
Block a user