This commit is contained in:
jl777
2016-12-09 16:05:21 +02:00
parent 0449e3f0a5
commit 9b570fb1f2
2 changed files with 13 additions and 5 deletions

View File

@@ -511,7 +511,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
{
printf("WOULD REJECT %s: ht.%d (%c) matched.%d vs num.%d\n",symbol,height,opcode,matched,num);
// can easily happen depending on order of loading
if ( height > 110000 ) //&& opcode == 'X' )
if ( height > 150000 )
{
printf("REJECT: ht.%d (%c) matched.%d vs num.%d\n",height,opcode,matched,num);
return(-1);

View File

@@ -18,12 +18,20 @@
uint64_t komodo_earned_interest(int32_t height,int64_t paidinterest)
{
static uint64_t *interests; static int32_t maxheight;
uint64_t total; int32_t ind,incr = 100000;
uint64_t total; int32_t ind,incr = 1000000;
if ( height >= maxheight )
{
interests = (uint64_t *)realloc(interests,(maxheight + incr) * sizeof(*interests) * 2);
memset(&interests[maxheight << 1],0,incr * sizeof(*interests) * 2);
maxheight += incr;
if ( interests == 0 )
{
interests = (uint64_t *)calloc(incr,sizeof(*interests) * 2); // fix before block 1 million
maxheight += incr;
}
else
{
interests = (uint64_t *)realloc(interests,(maxheight + incr) * sizeof(*interests) * 2);
memset(&interests[maxheight << 1],0,incr * sizeof(*interests) * 2);
maxheight += incr;
}
}
ind = (height << 1);
if ( paidinterest < 0 ) // request