test
This commit is contained in:
@@ -57,7 +57,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
|
||||
{
|
||||
if ( fread(&ht,1,sizeof(ht),fp) != sizeof(ht) )
|
||||
errs++;
|
||||
printf("func.(%d %c) ht.%d\n",func,func,ht);
|
||||
//printf("func.(%d %c) ht.%d\n",func,func,ht);
|
||||
if ( func == 'P' )
|
||||
{
|
||||
if ( (num= fgetc(fp)) < 64 )
|
||||
@@ -141,6 +141,11 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
|
||||
} else fp = fopen(fname,"wb+");
|
||||
printf("fname.(%s) fpos.%ld\n",fname,ftell(fp));
|
||||
}
|
||||
if ( height <= 0 )
|
||||
{
|
||||
printf("early return: stateupdate height.%d\n",height);
|
||||
return;
|
||||
}
|
||||
if ( fp != 0 ) // write out funcid, height, other fields, call side effect function
|
||||
{
|
||||
if ( height < 0 )
|
||||
|
||||
@@ -91,14 +91,14 @@ int32_t dpow_readprices(uint8_t *data,uint32_t *timestampp,double *KMDBTCp,doubl
|
||||
{
|
||||
if ( pvals[i] != 0 )
|
||||
nonz++;
|
||||
else if ( nonz != 0 )
|
||||
printf("pvals[%d] is zero\n",i);
|
||||
//else if ( nonz != 0 )
|
||||
// printf("pvals[%d] is zero\n",i);
|
||||
len += iguana_rwnum(0,&data[len],sizeof(uint32_t),(void *)&pvals[i]);
|
||||
//printf("%u ",pvals[i]);
|
||||
}
|
||||
if ( nonz < n-3 )
|
||||
{
|
||||
printf("nonz.%d n.%d retval -1\n",nonz,n);
|
||||
//printf("nonz.%d n.%d retval -1\n",nonz,n);
|
||||
return(-1);
|
||||
}
|
||||
pvals[i++] = kmdbtc;
|
||||
|
||||
Reference in New Issue
Block a user