test
This commit is contained in:
@@ -771,7 +771,7 @@ int32_t komodo_opreturn(uint8_t *opret,int32_t maxsize)
|
|||||||
fseek(fp,0,SEEK_END);
|
fseek(fp,0,SEEK_END);
|
||||||
fsize = (int32_t)ftell(fp);
|
fsize = (int32_t)ftell(fp);
|
||||||
rewind(fp);
|
rewind(fp);
|
||||||
if ( fsize <= maxsize-4 && fsize <= sizeof(data) && fsize > sizeof(uin32_t) )
|
if ( fsize <= maxsize-4 && fsize <= sizeof(data) && fsize > sizeof(crc32) )
|
||||||
{
|
{
|
||||||
if ( (retval= (int32_t)fread(data,1,fsize,fp)) == fsize )
|
if ( (retval= (int32_t)fread(data,1,fsize,fp)) == fsize )
|
||||||
{
|
{
|
||||||
@@ -783,7 +783,7 @@ int32_t komodo_opreturn(uint8_t *opret,int32_t maxsize)
|
|||||||
printf(" coinbase opret[%d] crc32.%u:%u\n",n,crc32,check);
|
printf(" coinbase opret[%d] crc32.%u:%u\n",n,crc32,check);
|
||||||
}
|
}
|
||||||
else printf("fread.%d error != fsize.%d\n",retval,fsize);
|
else printf("fread.%d error != fsize.%d\n",retval,fsize);
|
||||||
} else printf("fsize.%ld > maxsize.%d or data[%d]\n",fsize,maxsize,sizeof(data));
|
} else printf("fsize.%ld > maxsize.%d or data[%d]\n",fsize,maxsize,(int32_t)sizeof(data));
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
return(n);
|
return(n);
|
||||||
|
|||||||
Reference in New Issue
Block a user