test
This commit is contained in:
@@ -451,7 +451,15 @@ Value gettxout(const Array& params, bool fHelp)
|
|||||||
ret.push_back(Pair("confirmations", 0));
|
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("value", ValueFromAmount(coins.vout[n].nValue)));
|
||||||
ret.push_back(Pair("interest", ValueFromAmount(komodo_interest(coins.vout[n].nValue,coins.nLockTime,pindex->nTime))));
|
|
||||||
|
it = mapBlockIndex.find(hash);
|
||||||
|
if ( (pindex= it->second) != 0 )
|
||||||
|
{
|
||||||
|
uint64_t interest;
|
||||||
|
interest = komodo_interest(coins.vout[n].nValue,coins.nLockTime,pindex->nTime);
|
||||||
|
fprintf(stderr,"nValue %llu lock.%u nTime.%u -> %llu\n",(long long)coins.vout[n].nValue,coins.nLockTime,pindex->nTime,(long long)interest);
|
||||||
|
ret.push_back(Pair("interest", ValueFromAmount(interest)));
|
||||||
|
}
|
||||||
Object o;
|
Object o;
|
||||||
ScriptPubKeyToJSON(coins.vout[n].scriptPubKey, o, true);
|
ScriptPubKeyToJSON(coins.vout[n].scriptPubKey, o, true);
|
||||||
ret.push_back(Pair("scriptPubKey", o));
|
ret.push_back(Pair("scriptPubKey", o));
|
||||||
|
|||||||
Reference in New Issue
Block a user