Hush Is A Fast State Of Life
This commit is contained in:
@@ -378,11 +378,11 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
|
||||
komodo_statefname(fname,SMART_CHAIN_SYMBOL,(char *)"komodostate");
|
||||
if ( (fp= fopen(fname,"rb+")) != 0 )
|
||||
{
|
||||
if ( (retval= komodo_faststateinit(sp,fname,symbol,dest)) > 0 )
|
||||
if ( (retval= hush_faststateinit(sp,fname,symbol,dest)) > 0 )
|
||||
fseek(fp,0,SEEK_END);
|
||||
else
|
||||
{
|
||||
fprintf(stderr,"komodo_faststateinit retval.%d\n",retval);
|
||||
fprintf(stderr,"hush_faststateinit retval.%d\n",retval);
|
||||
while ( komodo_parsestatefile(sp,fp,symbol,dest) >= 0 )
|
||||
;
|
||||
}
|
||||
|
||||
@@ -1357,7 +1357,7 @@ long komodo_indfile_update(FILE *indfp,uint32_t *prevpos100p,long lastfpos,long
|
||||
return(newfpos);
|
||||
}
|
||||
|
||||
int32_t komodo_faststateinit(struct komodo_state *sp,char *fname,char *symbol,char *dest)
|
||||
int32_t hush_faststateinit(struct komodo_state *sp,char *fname,char *symbol,char *dest)
|
||||
{
|
||||
FILE *indfp; char indfname[1024]; uint8_t *filedata; long validated=-1,datalen,fpos,lastfpos; uint32_t tmp,prevpos100,indcounter,starttime; int32_t func,finished = 0;
|
||||
starttime = (uint32_t)time(NULL);
|
||||
@@ -1414,7 +1414,7 @@ int32_t komodo_faststateinit(struct komodo_state *sp,char *fname,char *symbol,ch
|
||||
finished = 1;
|
||||
}
|
||||
}
|
||||
} else printf("komodo_faststateinit unexpected case\n");
|
||||
} else printf("hush_faststateinit unexpected case\n");
|
||||
free(filedata);
|
||||
return(finished == 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user