Test
This commit is contained in:
@@ -812,10 +812,30 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (i=0; i<n; i++)
|
int64_t val,prevtotal = 0; int32_t overflow = 0;
|
||||||
printf("%.8f ",dstr(block.vtx[0].vout[i].nValue));
|
total = 0;
|
||||||
printf("no opreturn entries to check ht.%d\n",height);
|
for (i=1; i<n; i++)
|
||||||
return(-1);
|
{
|
||||||
|
if ( (val= block.vtx[0].vout[i].nValue) < 0 || val >= MAX_MONEY )
|
||||||
|
{
|
||||||
|
overflow = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
total += val;
|
||||||
|
if ( total < prevtotal || (val != 0 && total == prevtotal) )
|
||||||
|
{
|
||||||
|
overflow = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
prevtotal = total;
|
||||||
|
}
|
||||||
|
if ( overflow != 0 || total > COIN/10 )
|
||||||
|
{
|
||||||
|
for (i=0; i<n; i++)
|
||||||
|
printf("%.8f ",dstr(block.vtx[0].vout[i].nValue));
|
||||||
|
printf("no opreturn entries to check ht.%d\n",height);
|
||||||
|
return(-1);
|
||||||
|
} else return(0);
|
||||||
}
|
}
|
||||||
//printf("opretlen.%d num.%d\n",opretlen,num);
|
//printf("opretlen.%d num.%d\n",opretlen,num);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user