diff options
| author | Gregory Maxwell <[email protected]> | 2012-08-20 13:43:33 -0400 |
|---|---|---|
| committer | Gregory Maxwell <[email protected]> | 2012-08-24 03:28:45 -0400 |
| commit | b1093efa833376a7883deb0cbcddd0aed364de84 (patch) | |
| tree | 2c63671503ea5c8b3f53a6701d54d6a25cbae910 /src/rpcwallet.cpp | |
| parent | Add txout address filtering to listunspent. (diff) | |
| download | discoin-b1093efa833376a7883deb0cbcddd0aed364de84.tar.xz discoin-b1093efa833376a7883deb0cbcddd0aed364de84.zip | |
Change CWallet addressgrouping to use CTxDestination instead of strings.
This is cleanup for the listaddressgroupings code. Also add some
real help text.
Diffstat (limited to 'src/rpcwallet.cpp')
| -rw-r--r-- | src/rpcwallet.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 519e35313..a32eb7801 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -277,17 +277,21 @@ Value sendtoaddress(const Array& params, bool fHelp) Value listaddressgroupings(const Array& params, bool fHelp) { if (fHelp) - throw runtime_error("listaddressgroupings"); + throw runtime_error( + "listaddressgroupings\n" + "Lists groups of addresses which have had their common ownership\n" + "made public by common use as inputs or as the resulting change\n" + "in past transactions"); Array jsonGroupings; - map<string, int64> balances = pwalletMain->GetAddressBalances(); - BOOST_FOREACH(set<string> grouping, pwalletMain->GetAddressGroupings()) + map<CTxDestination, int64> balances = pwalletMain->GetAddressBalances(); + BOOST_FOREACH(set<CTxDestination> grouping, pwalletMain->GetAddressGroupings()) { Array jsonGrouping; - BOOST_FOREACH(string address, grouping) + BOOST_FOREACH(CTxDestination address, grouping) { Array addressInfo; - addressInfo.push_back(address); + addressInfo.push_back(CBitcoinAddress(address).ToString()); addressInfo.push_back(ValueFromAmount(balances[address])); { LOCK(pwalletMain->cs_wallet); |