From 98f682257aad19151b0b6b9f0890e2dbc29173ad Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 15 Nov 2016 17:59:15 -0300 Subject: [PATCH] test --- src/coins.cpp | 4 ++-- src/komodo_interest.h | 2 +- src/main.cpp | 2 +- src/wallet/wallet.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/coins.cpp b/src/coins.cpp index 7c3555f13..ca8bf3b46 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -398,9 +398,9 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTr value = GetOutputFor(tx.vin[i]).nValue; nResult += value; #ifdef KOMODO_ENABLE_INTEREST - if ( value >= COIN ) + if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 ) { - if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 ) + if ( value >= 10*COIN ) { int64_t interest; int32_t txheight; uint32_t locktime; interest = komodo_accrued_interest(&txheight,&locktime,tx.vin[i].prevout.hash,tx.vin[i].prevout.n,0,value); diff --git a/src/komodo_interest.h b/src/komodo_interest.h index e9a179e08..b58e45a90 100644 --- a/src/komodo_interest.h +++ b/src/komodo_interest.h @@ -58,7 +58,7 @@ uint64_t komodo_moneysupply(int32_t height) uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uint32_t tiptime) { int32_t minutes; uint64_t numerator,denominator,interest = 0; - if ( komodo_moneysupply(txheight) < MAX_MONEY && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= COIN ) + if ( komodo_moneysupply(txheight) < MAX_MONEY && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= 10*COIN ) { if ( (minutes= (tiptime - nLockTime) / 60) > 1 ) { diff --git a/src/main.cpp b/src/main.cpp index c34044672..79d3fde9d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1721,7 +1721,7 @@ bool NonContextualCheckInputs(const CTransaction& tx, CValidationState &state, c #ifdef KOMODO_ENABLE_INTEREST if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 ) { - if ( coins->vout[prevout.n].nValue >= COIN ) + if ( coins->vout[prevout.n].nValue >= 10*COIN ) { int64_t interest; int32_t txheight; uint32_t locktime; if ( (interest= komodo_accrued_interest(&txheight,&locktime,prevout.hash,prevout.n,0,coins->vout[prevout.n].nValue)) != 0 ) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 80c2581dc..60ee75694 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2210,7 +2210,7 @@ void CWallet::AvailableCoins(vector& vCoins, bool fOnlyConfirmed, const extern char ASSETCHAINS_SYMBOL[16]; if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 && chainActive.Tip() != 0 ) { - if ( pcoin->vout[i].nValue >= COIN ) + if ( pcoin->vout[i].nValue >= 10*COIN ) { interest = komodo_interest(chainActive.Tip()->nHeight+1,pcoin->vout[i].nValue,pcoin->nLockTime,chainActive.Tip()->nTime); if ( interest != 0 )