This commit is contained in:
jl777
2016-10-22 11:32:24 -03:00
parent 2ffcaf4e1c
commit cad0d1ca62
5 changed files with 10 additions and 6 deletions

View File

@@ -449,10 +449,9 @@ Value gettxout(const Array& params, bool fHelp)
ret.push_back(Pair("bestblock", pindex->GetBlockHash().GetHex()));
if ((unsigned int)coins.nHeight == MEMPOOL_HEIGHT)
ret.push_back(Pair("confirmations", 0));
else
ret.push_back(Pair("confirmations", pindex->nHeight - coins.nHeight + 1));
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))));
ret.push_back(Pair("interest", ValueFromAmount(komodo_interest(coins.vout[n].nValue,coins.nLockTime,coins.nTime))));
Object o;
ScriptPubKeyToJSON(coins.vout[n].scriptPubKey, o, true);
ret.push_back(Pair("scriptPubKey", o));