Skip to content

Commit 0e21e09

Browse files
committed
[Cleanup] Remove un-used printAddresses() function in rpcwallet
1 parent a8dd236 commit 0e21e09

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4208,35 +4208,6 @@ UniValue getautocombinethreshold(const JSONRPCRequest& request)
42084208
return result;
42094209
}
42104210

4211-
UniValue printAddresses()
4212-
{
4213-
std::vector<COutput> vCoins;
4214-
pwalletMain->AvailableCoins(&vCoins);
4215-
std::map<std::string, double> mapAddresses;
4216-
for (const COutput& out : vCoins) {
4217-
CTxDestination utxoAddress;
4218-
ExtractDestination(out.tx->tx->vout[out.i].scriptPubKey, utxoAddress);
4219-
std::string strAdd = EncodeDestination(utxoAddress);
4220-
4221-
if (mapAddresses.find(strAdd) == mapAddresses.end()) //if strAdd is not already part of the map
4222-
mapAddresses[strAdd] = (double)out.tx->tx->vout[out.i].nValue / (double)COIN;
4223-
else
4224-
mapAddresses[strAdd] += (double)out.tx->tx->vout[out.i].nValue / (double)COIN;
4225-
}
4226-
4227-
UniValue ret(UniValue::VARR);
4228-
for (std::map<std::string, double>::const_iterator it = mapAddresses.begin(); it != mapAddresses.end(); ++it) {
4229-
UniValue obj(UniValue::VOBJ);
4230-
const std::string* strAdd = &(*it).first;
4231-
const double* nBalance = &(*it).second;
4232-
obj.pushKV("Address ", *strAdd);
4233-
obj.pushKV("Balance ", *nBalance);
4234-
ret.push_back(obj);
4235-
}
4236-
4237-
return ret;
4238-
}
4239-
42404211
UniValue getsaplingnotescount(const JSONRPCRequest& request)
42414212
{
42424213
if (!EnsureWalletIsAvailable(pwalletMain, request.fHelp))

0 commit comments

Comments
 (0)