Test
This commit is contained in:
@@ -346,7 +346,7 @@ void komodo_stateupdate(int32_t height,uint8_t notarypubs[][33],uint8_t numnotar
|
|||||||
komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"komodostate");
|
komodo_statefname(fname,ASSETCHAINS_SYMBOL,(char *)"komodostate");
|
||||||
if ( (fp= fopen(fname,"rb+")) != 0 )
|
if ( (fp= fopen(fname,"rb+")) != 0 )
|
||||||
{
|
{
|
||||||
if ( (retval= komodo_faststateinit(sp,fname,symbol,dest)) == 0 )
|
if ( (retval= komodo_faststateinit(sp,fname,symbol,dest)) > 0 )
|
||||||
fseek(fp,0,SEEK_END);
|
fseek(fp,0,SEEK_END);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1412,6 +1412,7 @@ long komodo_stateind_validate(struct komodo_state *sp,char *indfname,uint8_t *fi
|
|||||||
*indcounterp = *prevpos100p = 0;
|
*indcounterp = *prevpos100p = 0;
|
||||||
if ( (inds= OS_fileptr(&fsize,indfname)) != 0 )
|
if ( (inds= OS_fileptr(&fsize,indfname)) != 0 )
|
||||||
{
|
{
|
||||||
|
fprintf(stderr,"validate %s fsize.%ld datalen.%ld n.%ld\n",indfname,fsize,datalen,fsize / sizeof(uint32_t));
|
||||||
if ( (fsize % sizeof(uint32_t)) == 0 )
|
if ( (fsize % sizeof(uint32_t)) == 0 )
|
||||||
{
|
{
|
||||||
n = (int32_t)(fsize / sizeof(uint32_t));
|
n = (int32_t)(fsize / sizeof(uint32_t));
|
||||||
@@ -1419,7 +1420,7 @@ long komodo_stateind_validate(struct komodo_state *sp,char *indfname,uint8_t *fi
|
|||||||
{
|
{
|
||||||
memcpy(&tmp,&inds[i * sizeof(uint32_t)],sizeof(uint32_t));
|
memcpy(&tmp,&inds[i * sizeof(uint32_t)],sizeof(uint32_t));
|
||||||
if ( i > n-10 )
|
if ( i > n-10 )
|
||||||
printf("%d: tmp.%08x prevpos100.%u\n",i,tmp,prevpos100);
|
printf("%d: tmp.%08x [%c] prevpos100.%u\n",i,tmp,tmp&0xff,prevpos100);
|
||||||
if ( (i % 100) == 0 )
|
if ( (i % 100) == 0 )
|
||||||
prevpos100 = tmp;
|
prevpos100 = tmp;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user