This commit is contained in:
jl777
2016-10-22 13:03:18 -03:00
parent 7a77c4431c
commit 2860f74793
2 changed files with 5 additions and 2 deletions

View File

@@ -454,7 +454,11 @@ 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)));
uint64_t interest; uint32_t timestamp = komodo_txtime(hash);
CBlockIndex *pblockindex = chainActive[coins.nHeight];
uint64_t interest; uint32_t timestamp=0;
if ( pblockindex != 0 )
timestamp = pblockindex->nTime;
interest = komodo_interest(coins.vout[n].nValue,timestamp,pindex->nTime);
fprintf(stderr,"nValue %llu lock.%u:%u nTime.%u -> %llu\n",(long long)coins.vout[n].nValue,coins.nLockTime,timestamp,pindex->nTime,(long long)interest);
ret.push_back(Pair("interest", ValueFromAmount(interest)));