From dd2850969594a03d50a69ff7e8997a8b8125a1fb Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 16 Mar 2017 20:19:27 +0200 Subject: [PATCH] Revert "Test" This reverts commit 7f2e458b29ce9f5b8cae624d060d34c3206c11ae. --- src/komodo_interest.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/komodo_interest.h b/src/komodo_interest.h index 2aa745070..fd07a44e0 100644 --- a/src/komodo_interest.h +++ b/src/komodo_interest.h @@ -104,9 +104,13 @@ uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uin if ( exception == 0 ) { numerator = (nValue / 20); // assumes 5%! - if ( txheight < 300000 ) + if ( txheight < 30000 ) interest = (numerator / denominator); - else interest = (numerator * minutes) / ((uint64_t)365 * 24 * 60); + else + { + interest = (numerator * minutes) / ((uint64_t)365 * 24 * 60); + printf("(%llu * %llu) = %llu; ",(long long)numerator,(long long)minutes,(long long)(numerator * minutes)); + } } else { @@ -121,7 +125,7 @@ uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uin interest = (numerator / denominator) / COIN; else interest = ((numerator * minutes) / ((uint64_t)365 * 24 * 60)) / COIN; } - //fprintf(stderr,"komodo_interest %lld %.8f nLockTime.%u tiptime.%u minutes.%d interest %lld %.8f (%llu / %llu)\n",(long long)nValue,(double)nValue/COIN,nLockTime,tiptime,minutes,(long long)interest,(double)interest/COIN,(long long)numerator,(long long)denominator); + fprintf(stderr,"komodo_interest %lld %.8f nLockTime.%u tiptime.%u minutes.%d interest %lld %.8f (%llu / %llu)\n",(long long)nValue,(double)nValue/COIN,nLockTime,tiptime,minutes,(long long)interest,(double)interest/COIN,(long long)numerator,(long long)denominator); } } return(interest);