diff options
author | Andrey <al42and@gmail.com> | 2012-12-13 18:59:10 +0400 |
---|---|---|
committer | Andrey <al42and@gmail.com> | 2012-12-13 18:59:10 +0400 |
commit | 62c9b1155f966cfb91d01d5598f974610962fa82 (patch) | |
tree | 9661741ffcacf8b3e99237419f65e38c1e2c0b4a /src/rpcwallet.cpp | |
parent | 07c3f846c260020aa07af92d28f384509d79a086 (diff) |
listreceivedbyaddress now provides tx ids (issue #1149)
Diffstat (limited to 'src/rpcwallet.cpp')
-rw-r--r-- | src/rpcwallet.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 90a68f560a..e17be780ac 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -813,6 +813,7 @@ struct tallyitem { int64 nAmount; int nConf; + vector<uint256> txids; tallyitem() { nAmount = 0; @@ -854,6 +855,7 @@ Value ListReceived(const Array& params, bool fByAccounts) tallyitem& item = mapTally[address]; item.nAmount += txout.nValue; item.nConf = min(item.nConf, nDepth); + item.txids.push_back(wtx.GetHash()); } } @@ -889,6 +891,12 @@ Value ListReceived(const Array& params, bool fByAccounts) obj.push_back(Pair("account", strAccount)); obj.push_back(Pair("amount", ValueFromAmount(nAmount))); obj.push_back(Pair("confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf))); + Array transactions; + BOOST_FOREACH(const uint256& item, (*it).second.txids) + { + transactions.push_back(item.GetHex()); + } + obj.push_back(Pair("txids", transactions)); ret.push_back(obj); } } |