aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-09-01 22:07:47 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-09-02 08:02:46 +0000
commitddb709e9de1490afcfa1af045517d2228d5b864c (patch)
tree46a8f68d95e38d527729e2b7da7976dad8654921 /src/wallet.h
parentc3f95ef13f48d21db53992984976eac93e7a08fc (diff)
downloadbitcoin-ddb709e9de1490afcfa1af045517d2228d5b864c.tar.xz
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.
Diffstat (limited to 'src/wallet.h')
-rw-r--r--src/wallet.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet.h b/src/wallet.h
index 9103aa675e..65d3448212 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -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);