From 6c6b7216f3b7eb6a30eedc00edcea0418b98f995 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 27 Jul 2018 06:37:17 -1100 Subject: [PATCH] Test --- src/cc/rewards.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cc/rewards.cpp b/src/cc/rewards.cpp index 851cedf2a..3613864cf 100644 --- a/src/cc/rewards.cpp +++ b/src/cc/rewards.cpp @@ -47,8 +47,8 @@ uint64_t RewardsCalc(uint64_t amount,uint256 txid,uint64_t APR,uint64_t minsecon } else if ( duration > maxseconds ) maxseconds = duration; - reward = (((amount * APR) / COIN) * duration) / 365*24*3600; - fprintf(stderr,"amount %.8f %.8f %llu -> duration.%llu reward %.8f\n",(double)amount/COIN,((double)amount * APR)/COIN,(long long)(((amount * APR) / COIN) * duration) / 365*24*3600,(long long)duration,(double)reward/COIN); + reward = (((amount * APR) / COIN) / 365*24*3600) * duration; + fprintf(stderr,"amount %.8f %.8f %llu -> duration.%llu reward %.8f\n",(double)amount/COIN,((double)amount * APR)/COIN,(long long)(((amount * APR) / COIN) / 365*24*3600),(long long)duration,(double)reward/COIN); return(reward); }