mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
listreceivedbyaddress now provides tx ids (issue #1149)
This commit is contained in:
parent
f237d48e50
commit
b48905fa29
@ -811,6 +811,7 @@ struct tallyitem
|
||||
{
|
||||
int64 nAmount;
|
||||
int nConf;
|
||||
vector<uint256> txids;
|
||||
tallyitem()
|
||||
{
|
||||
nAmount = 0;
|
||||
@ -852,6 +853,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());
|
||||
}
|
||||
}
|
||||
|
||||
@ -887,6 +889,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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user