This commit is contained in:
jl777
2016-11-15 17:59:15 -03:00
parent 38dfbe150a
commit 98f682257a
4 changed files with 5 additions and 5 deletions

View File

@@ -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);

View File

@@ -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 )
{

View File

@@ -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 )

View File

@@ -2210,7 +2210,7 @@ void CWallet::AvailableCoins(vector<COutput>& 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 )