From 49df008c16e791379926c789e2006ce718cdba89 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Oct 2016 14:50:59 -0300 Subject: [PATCH] test --- src/komodo.h | 7 ++++++- src/komodo_pax.h | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index 740fac6fd..44119923c 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -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 ) diff --git a/src/komodo_pax.h b/src/komodo_pax.h index b6088a80a..46a2b37d4 100644 --- a/src/komodo_pax.h +++ b/src/komodo_pax.h @@ -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;