This commit is contained in:
jl777
2016-10-21 17:28:28 -03:00
parent 75b751ec17
commit 0f24f24562
6 changed files with 24 additions and 10 deletions

View File

@@ -380,6 +380,7 @@ Value gettxoutsetinfo(const Array& params, bool fHelp)
return ret;
}
int64_t komodo_interest(uint64_t nValue,uint32_t pastlocktime,uint32_t tiptime);
Value gettxout(const Array& params, bool fHelp)
{
if (fHelp || params.size() < 2 || params.size() > 3)
@@ -451,6 +452,7 @@ Value gettxout(const Array& params, bool fHelp)
else
ret.push_back(Pair("confirmations", pindex->nHeight - coins.nHeight + 1));
ret.push_back(Pair("value", ValueFromAmount(coins.vout[n].nValue)));
ret.push_back(Pair("interest", ValueFromAmount(komodo_interest(coins.vout[n].nValue,coins.nLockTime,chainActive.Tip()->nTime))));
Object o;
ScriptPubKeyToJSON(coins.vout[n].scriptPubKey, o, true);
ret.push_back(Pair("scriptPubKey", o));