From 2d4c201cefa8a383bb44624e42e6d43d5a270654 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 4 Nov 2016 09:16:44 -0300 Subject: [PATCH] test --- src/coins.cpp | 3 ++- src/wallet/wallet.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/coins.cpp b/src/coins.cpp index 4272ed611..a3acfd559 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -398,7 +398,8 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTr nResult += value; interest = komodo_interest(nHeight,value,tx.nLockTime,tiptime); #ifdef KOMODO_ENABLE_INTEREST - nResult += interest; + if ( nHeight >= 60000 ) + nResult += interest; #endif (*interestp) += interest; } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index df9b8ee43..f0f4daff0 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2400,7 +2400,8 @@ bool CWallet::SelectCoins(const CAmount& nTargetValue, setvout[out.i].nValue; interest = komodo_interest(chainActive.Tip()->nHeight,out.tx->vout[out.i].nValue,out.tx->nLockTime,chainActive.Tip()->nTime); #ifdef KOMODO_ENABLE_INTEREST - nValueRet += interest; + if ( txheight >= 60000 ) + nValueRet += interest; #endif fprintf(stderr,"interest %llu from %llu lock.%u tip.%u\n",(long long)interest,(long long)out.tx->vout[out.i].nValue,out.tx->nLockTime,chainActive.Tip()->nTime); setCoinsRet.insert(make_pair(out.tx, out.i));