From 8c18d226b342b9d5fba6ffd7a6fe1a556e148132 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 5 Nov 2017 12:39:07 +0200 Subject: [PATCH] Test --- src/komodo.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index e49eb7452..77f7dc04b 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -328,7 +328,7 @@ int32_t komodo_parsestatefiledata(struct komodo_state *sp,uint8_t *filedata,long void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotaries,uint8_t notaryid,uint256 txhash,uint64_t voutmask,uint8_t numvouts,uint32_t *pvals,uint8_t numpvals,int32_t KMDheight,uint32_t KMDtimestamp,uint64_t opretvalue,uint8_t *opretbuf,uint16_t opretlen,uint16_t vout) { static FILE *fp; static int32_t errs,didinit; - struct komodo_state *sp; char fname[512],symbol[16],dest[16]; int32_t ht,func; uint8_t num,pubkeys[64][33]; + struct komodo_state *sp; char fname[512],symbol[16],dest[16]; int32_t retval,ht,func; uint8_t num,pubkeys[64][33]; if ( didinit == 0 ) { portable_mutex_init(&KOMODO_KV_mutex); @@ -346,10 +346,11 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"komodostate"); if ( (fp= fopen(fname,"rb+")) != 0 ) { - if ( komodo_faststateinit(sp,fname,symbol,dest) == 0 ) + if ( (retval= komodo_faststateinit(sp,fname,symbol,dest)) == 0 ) fseek(fp,0,SEEK_END); else { + fprintf(stderr,"komodo_faststateinit retval.%d\n",retval);) while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 ) ; }