Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
09ef363506
  1. 6
      iguana/iguana_tx.c
  2. 2
      iguana/m_unix

6
iguana/iguana_tx.c

@ -25,19 +25,19 @@
int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,long fileptr[2],char *fname,uint32_t scriptpos,int32_t scriptlen) int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,long fileptr[2],char *fname,uint32_t scriptpos,int32_t scriptlen)
{ {
FILE *fp; int32_t retval = scriptlen; FILE *fp; int32_t retval = scriptlen;
/*#ifndef __PNACL__ #ifndef __PNACL__
if ( fileptr[0] == 0 ) if ( fileptr[0] == 0 )
fileptr[0] = (uint64_t)OS_mapfile(fname,&fileptr[1],0); fileptr[0] = (uint64_t)OS_mapfile(fname,&fileptr[1],0);
if ( fileptr[0] != 0 && (scriptpos + scriptlen) <= fileptr[1] ) if ( fileptr[0] != 0 && (scriptpos + scriptlen) <= fileptr[1] )
memcpy(scriptspace,(void *)(fileptr[0] + scriptpos),scriptlen); memcpy(scriptspace,(void *)(fileptr[0] + scriptpos),scriptlen);
else else
#endif*/ #endif
if ( (fp= fopen(fname,"rb")) != 0 ) if ( (fp= fopen(fname,"rb")) != 0 )
{ {
fseek(fp,scriptpos,SEEK_SET); fseek(fp,scriptpos,SEEK_SET);
if ( fread(scriptspace,1,scriptlen,fp) != scriptlen ) if ( fread(scriptspace,1,scriptlen,fp) != scriptlen )
retval = -1; retval = -1;
else printf("%s script[%d] offset.%d\n",fname,scriptlen,scriptpos); //else printf("%s script[%d] offset.%d\n",fname,scriptlen,scriptpos);
fclose(fp); fclose(fp);
} else retval = -1; } else retval = -1;
return(retval); return(retval);

2
iguana/m_unix

@ -1,5 +1,5 @@
#./configure --enable-endomorphism --enable-module-ecdh --enable-module-schnorr --enable-module-rangeproof --enable-experimental #./configure --enable-endomorphism --enable-module-ecdh --enable-module-schnorr --enable-module-rangeproof --enable-experimental
rm ../agents/iguana
git pull git pull
gcc -g -Wno-deprecated -c -O2 *.c gcc -g -Wno-deprecated -c -O2 *.c
gcc -g -Wno-deprecated -c main.c iguana777.c iguana_bundles.c gcc -g -Wno-deprecated -c main.c iguana777.c iguana_bundles.c

Loading…
Cancel
Save