This commit is contained in:
jl777
2016-10-21 18:15:46 -03:00
parent ce8b023c7a
commit 40cb0c7d41
2 changed files with 2 additions and 2 deletions

View File

@@ -273,7 +273,7 @@ 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;
tiptime = chainActive.Tip()->nTime;
if ( nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= COIN )
{
minutes = (tiptime - nLockTime) / 60;

View File

@@ -2375,7 +2375,7 @@ bool CWallet::SelectCoins(const CAmount& nTargetValue, set<pair<const CWalletTx*
if(!out.fSpendable)
continue;
nValueRet += out.tx->vout[out.i].nValue;
nValueRet += komodo_interest(out.tx->vout[out.i].nValue,out.tx.nLockTime,activeChain.Tip()->nTime);
nValueRet += komodo_interest(out.tx->vout[out.i].nValue,out.tx.nLockTime,chainActive.Tip()->nTime);
setCoinsRet.insert(make_pair(out.tx, out.i));
}
return (nValueRet >= nTargetValue);