test
This commit is contained in:
@@ -39,7 +39,7 @@ using namespace std;
|
|||||||
*
|
*
|
||||||
* Or alternatively, create a specific query method for the information.
|
* Or alternatively, create a specific query method for the information.
|
||||||
**/
|
**/
|
||||||
uint64_t komod_interestsum();
|
uint64_t komodo_interestsum();
|
||||||
|
|
||||||
Value getinfo(const Array& params, bool fHelp)
|
Value getinfo(const Array& params, bool fHelp)
|
||||||
{
|
{
|
||||||
@@ -92,7 +92,7 @@ Value getinfo(const Array& params, bool fHelp)
|
|||||||
if (pwalletMain) {
|
if (pwalletMain) {
|
||||||
obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
|
obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
|
||||||
obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance())));
|
obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance())));
|
||||||
obj.push_back(Pair("interest", ValueFromAmount(komod_interestsum())));
|
obj.push_back(Pair("interest", ValueFromAmount(komodo_interestsum())));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
obj.push_back(Pair("blocks", (int)chainActive.Height()));
|
obj.push_back(Pair("blocks", (int)chainActive.Height()));
|
||||||
|
|||||||
@@ -2494,7 +2494,7 @@ Value listunspent(const Array& params, bool fHelp)
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t komod_interestsum()
|
uint64_t komodo_interestsum()
|
||||||
{
|
{
|
||||||
uint64_t interest,sum = 0;
|
uint64_t interest,sum = 0;
|
||||||
vector<COutput> vecOutputs;
|
vector<COutput> vecOutputs;
|
||||||
@@ -3210,9 +3210,11 @@ Value z_gettotalbalance(const Array& params, bool fHelp)
|
|||||||
// so we use our own method to get balance of utxos.
|
// so we use our own method to get balance of utxos.
|
||||||
CAmount nBalance = getBalanceTaddr("", nMinDepth);
|
CAmount nBalance = getBalanceTaddr("", nMinDepth);
|
||||||
CAmount nPrivateBalance = getBalanceZaddr("", nMinDepth);
|
CAmount nPrivateBalance = getBalanceZaddr("", nMinDepth);
|
||||||
CAmount nTotalBalance = nBalance + nPrivateBalance;
|
uint64_t interest = komodo_interestsum();
|
||||||
|
CAmount nTotalBalance = nBalance + nPrivateBalance + interest;
|
||||||
Object result;
|
Object result;
|
||||||
result.push_back(Pair("transparent", FormatMoney(nBalance, false)));
|
result.push_back(Pair("transparent", FormatMoney(nBalance, false)));
|
||||||
|
result.push_back(Pair("interest", FormatMoney(interest, false)));
|
||||||
result.push_back(Pair("private", FormatMoney(nPrivateBalance, false)));
|
result.push_back(Pair("private", FormatMoney(nPrivateBalance, false)));
|
||||||
result.push_back(Pair("total", FormatMoney(nTotalBalance, false)));
|
result.push_back(Pair("total", FormatMoney(nTotalBalance, false)));
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user