From 3b97ccc9a7c4c8f8a0462d11890287bea9456ca1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 15 Nov 2016 11:39:36 -0300 Subject: [PATCH] test --- src/coins.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/coins.cpp b/src/coins.cpp index 2b73f3ebf..6343e2374 100644 --- a/src/coins.cpp +++ b/src/coins.cpp @@ -400,16 +400,16 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTr #ifdef KOMODO_ENABLE_INTEREST if ( strcmp(ASSETCHAINS_SYMBOL,"REVS") == 0 )//&& nHeight >= 60000 ) { - int64_t interest; - interest = komodo_accrued_interest(GetOutputFor(tx.vin[i]).hash,GetOutputFor(tx.vin[i]).n,nHeight,value); - //interest = komodo_interest(nHeight,value,tx.nLockTime,tiptime); - //if ( interest != 0 || value >= COIN*100 ) + //if ( value >= COIN*100 ) { + int64_t interest; + interest = komodo_accrued_interest(tx.vin[i].prevout.hash,tx.vin[i].prevout.n,nHeight,value); + //interest = komodo_interest(nHeight,value,tx.nLockTime,tiptime); printf("nResult %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)nResult/COIN,(double)interest/COIN,nHeight,tx.nLockTime,tiptime); fprintf(stderr,"nResult %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)nResult/COIN,(double)interest/COIN,nHeight,tx.nLockTime,tiptime); + nResult += interest; + (*interestp) += interest; } - nResult += interest; - (*interestp) += interest; } #endif }