|
|
@ -796,8 +796,10 @@ Value getbalance(const Array& params, bool fHelp)
|
|
|
|
list<pair<CBitcoinAddress, int64> > listSent;
|
|
|
|
list<pair<CBitcoinAddress, int64> > listSent;
|
|
|
|
wtx.GetAmounts(allGeneratedImmature, allGeneratedMature, listReceived, listSent, allFee, strSentAccount);
|
|
|
|
wtx.GetAmounts(allGeneratedImmature, allGeneratedMature, listReceived, listSent, allFee, strSentAccount);
|
|
|
|
if (wtx.GetDepthInMainChain() >= nMinDepth)
|
|
|
|
if (wtx.GetDepthInMainChain() >= nMinDepth)
|
|
|
|
|
|
|
|
{
|
|
|
|
BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress,int64)& r, listReceived)
|
|
|
|
BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress,int64)& r, listReceived)
|
|
|
|
nBalance += r.second;
|
|
|
|
nBalance += r.second;
|
|
|
|
|
|
|
|
}
|
|
|
|
BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress,int64)& r, listSent)
|
|
|
|
BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress,int64)& r, listSent)
|
|
|
|
nBalance -= r.second;
|
|
|
|
nBalance -= r.second;
|
|
|
|
nBalance -= allFee;
|
|
|
|
nBalance -= allFee;
|
|
|
@ -1228,6 +1230,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
|
|
|
|
|
|
|
|
|
|
|
|
// Received
|
|
|
|
// Received
|
|
|
|
if (listReceived.size() > 0 && wtx.GetDepthInMainChain() >= nMinDepth)
|
|
|
|
if (listReceived.size() > 0 && wtx.GetDepthInMainChain() >= nMinDepth)
|
|
|
|
|
|
|
|
{
|
|
|
|
BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, int64)& r, listReceived)
|
|
|
|
BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, int64)& r, listReceived)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string account;
|
|
|
|
string account;
|
|
|
@ -1245,6 +1248,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
|
|
|
|
ret.push_back(entry);
|
|
|
|
ret.push_back(entry);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AcentryToJSON(const CAccountingEntry& acentry, const string& strAccount, Array& ret)
|
|
|
|
void AcentryToJSON(const CAccountingEntry& acentry, const string& strAccount, Array& ret)
|
|
|
|