This commit is contained in:
jl777
2017-01-25 06:48:36 +02:00
parent 579d237442
commit d4a420a312

View File

@@ -75,10 +75,23 @@ uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uin
denominator = (((uint64_t)365 * 24 * 60) / minutes); denominator = (((uint64_t)365 * 24 * 60) / minutes);
if ( denominator == 0 ) if ( denominator == 0 )
denominator = 1; // max KOMODO_INTEREST per transfer, do it at least annually! denominator = 1; // max KOMODO_INTEREST per transfer, do it at least annually!
if ( nValue > 25000LL*COIN && txheight > 155949 ) if ( nValue > 25000LL*COIN )
{ {
numerator = (nValue / 20); // assumes 5%! if ( txheight <= 155949 )
interest = (numerator / denominator); {
printf(">>>>>>>>>>>> txheight.%d %.8f locktime %u vs tiptime %u <<<<<<<<<\n",txheight,(double)nValue/COIN,nLockTime,tiptime);
exception = 0;
}
if ( exception == 0 )
{
numerator = (nValue / 20); // assumes 5%!
interest = (numerator / denominator);
}
else
{
numerator = (nValue * KOMODO_INTEREST);
interest = (numerator / denominator) / COIN;
}
} }
else else
{ {