Merge pull request #115 from jl777/beta

Beta
This commit is contained in:
jl777
2017-01-16 03:41:51 +02:00
committed by GitHub
3 changed files with 5661 additions and 3 deletions

5650
src/REVS.snapshot Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -72,11 +72,19 @@ uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uin
{
if ( (minutes= (tiptime - nLockTime) / 60) >= 60 )
{
numerator = (nValue * KOMODO_INTEREST);
denominator = (((uint64_t)365 * 24 * 60) / minutes);
if ( denominator == 0 )
denominator = 1; // max KOMODO_INTEREST per transfer, do it at least annually!
interest = (numerator / denominator) / COIN;
if ( nValue > 25000LL*COIN && txheight > 155949 )
{
numerator = (nValue / 20); // assumes 5%!
interest = (numerator / denominator);
}
else
{
numerator = (nValue * KOMODO_INTEREST);
interest = (numerator / denominator) / 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);
}
}

View File

@@ -464,7 +464,7 @@ Value notaries(const Array& params, bool fHelp)
LOCK(cs_main);
int32_t height = atoi(params[0].get_str().c_str());
if ( height < 0 )
height = 0;
height = chainActive.Tip()->nHeight;
//fprintf(stderr,"notaries as of height.%d\n",height);
//if ( height > chainActive.Height()+20000 )
// throw JSONRPCError(RPC_INVALID_PARAMETER, "Block height out of range");