Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
b1b6c01517
  1. 2
      iguana/iguana777.c
  2. 16
      iguana/iguana_blocks.c
  3. 2
      iguana/iguana_payments.c
  4. 2
      iguana/iguana_sign.c
  5. 2
      iguana/iguana_txidfind.c

2
iguana/iguana777.c

@ -803,7 +803,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
// maxval = (int32_t)coin->MAXMEM;
coin->MAXMEM *= (1024L * 1024 * 1024);
#ifdef __PNACL__
maxval = 1;// * (strcmp("BTC",coin->symbol) != 0) + 8;
//maxval = 1;// * (strcmp("BTC",coin->symbol) != 0) + 8;
//if ( mult > 1 )
// mult /= 2;
#endif

16
iguana/iguana_blocks.c

@ -144,22 +144,12 @@ bits256 *iguana_blockhashptr(struct iguana_info *coin,int32_t height)
{
hdrsi = (height / bundlesize);
bundlei = height - (hdrsi * bundlesize);
if ( hdrsi >= 0 && hdrsi < bundlesize && bundlei >= 0 && bundlei < bundlesize && (bp= coin->bundles[hdrsi]) != 0 )
if ( hdrsi >= 0 && hdrsi < coin->bundlescount && bundlei >= 0 && bundlei < bundlesize )
{
if ( (bp= coin->bundles[hdrsi]) != 0 )
return(&bp->hashes[bundlei]);
else return(0);
}
/*for (i=0; i<coin->bundlescount; i++)
{
if ( (bp= coin->bundles[i]) != 0 )
{
if ( height >= bp->bundleheight && height < bp->bundleheight+bp->n )
{
hashptr = &bp->hashes[height - bp->bundleheight];
//printf("i.%d hashptr.%p height.%d vs (%d %d)\n",i,hashptr,height,bp->bundleheight,bp->bundleheight+bp->n);
return(hashptr);
}
}
}*/
}
return(0);
}

2
iguana/iguana_payments.c

@ -919,7 +919,7 @@ HASH_AND_INT(bitcoinrpc,getrawtransaction,txid,verbose)
return(jprint(txobj,1));
}
jaddstr(retjson,"result",txbytes);
printf("txbytes.(%s) len.%d (%s)\n",txbytes,len,jprint(retjson,0));
char str[65]; printf("txbytes.(%s) len.%d (%s) %s\n",txbytes,len,jprint(retjson,0),bits256_str(str,checktxid));
free(txbytes);
return(jprint(retjson,1));
}

2
iguana/iguana_sign.c

@ -90,7 +90,7 @@ int32_t iguana_voutparse(int32_t rwflag,uint8_t *serialized,struct iguana_msgvou
if ( rwflag == 0 )
msg->pk_script = &serialized[len];
else memcpy(&serialized[len],msg->pk_script,msg->pk_scriptlen);
if ( 0 )
if ( 1 )
{
int32_t i;
for (i=0; i<msg->pk_scriptlen; i++)

2
iguana/iguana_txidfind.c

@ -266,6 +266,7 @@ struct iguana_txid *iguana_txidfind(struct iguana_info *coin,int32_t *heightp,st
uint8_t *TXbits; struct iguana_txid *T; uint32_t txidind; int32_t i;
struct iguana_bundle *bp; struct iguana_ramchain *ramchain; //struct iguana_block *block;
*heightp = -1;
memset(tx,0,sizeof(*tx));
if ( lasthdrsi < 0 )
return(0);
for (i=lasthdrsi; i>=0; i--)
@ -323,6 +324,7 @@ struct iguana_txid *iguana_txidfind(struct iguana_info *coin,int32_t *heightp,st
*heightp = bp->bundleheight + T[txidind].bundlei;
//printf("found height.%d\n",*heightp);
*tx = T[txidind];
//printf("[%d] txidind.%d 1st.(%d %d)\n",bp->hdrsi,txidind,tx->firstvout,tx->firstvin);
return(tx);
}
}

Loading…
Cancel
Save