diff --git a/src/komodo.h b/src/komodo.h index 9fc7a65e0..9ebbf2c21 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -272,6 +272,8 @@ uint32_t komodo_txtime(uint256 hash) int64_t komodo_interest(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime) { int32_t minutes,days; uint64_t interest = 0; + if ( tiptime == 0 ) + tiptime = activeChain.Tip()->nTime; if ( nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= COIN ) { minutes = (tiptime - nLockTime) / 60; diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 5a30e76ce..1038854e1 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2364,7 +2364,7 @@ Value listunspent(const Array& params, bool fHelp) } } entry.push_back(Pair("amount",ValueFromAmount(nValue))); - entry.push_back(Pair("interest",ValueFromAmount(komodo_interest(nValue,out.tx->nLockTime,activeChain.Tip()->nTime)))); + entry.push_back(Pair("interest",ValueFromAmount(komodo_interest(nValue,out.tx->nLockTime,0)))); entry.push_back(Pair("confirmations",out.nDepth)); entry.push_back(Pair("spendable", out.fSpendable)); results.push_back(entry);