Browse Source

test

pull/4/head
jl777 7 years ago
parent
commit
d4a420a312
  1. 19
      src/komodo_interest.h

19
src/komodo_interest.h

@ -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);
if ( denominator == 0 )
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%!
interest = (numerator / denominator);
if ( txheight <= 155949 )
{
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
{

Loading…
Cancel
Save