Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
61b4ffdc0f
  1. 4
      iguana/iguana_tx.c

4
iguana/iguana_tx.c

@ -116,7 +116,7 @@ int32_t iguana_voutscript(struct iguana_info *coin,struct iguana_bundle *bp,uint
int32_t iguana_voutset(struct iguana_info *coin,uint8_t *scriptspace,char *asmstr,int32_t height,struct iguana_msgvout *vout,struct iguana_txid *tx,int32_t i) int32_t iguana_voutset(struct iguana_info *coin,uint8_t *scriptspace,char *asmstr,int32_t height,struct iguana_msgvout *vout,struct iguana_txid *tx,int32_t i)
{ {
struct iguana_ramchaindata *rdata; uint32_t unspentind,scriptlen = 0; struct iguana_bundle *bp; struct iguana_ramchaindata *rdata=0; uint32_t unspentind,scriptlen = 0; struct iguana_bundle *bp;
struct iguana_unspent *u,*U; struct iguana_pkhash *P; int32_t err = 0; struct iguana_unspent *u,*U; struct iguana_pkhash *P; int32_t err = 0;
memset(vout,0,sizeof(*vout)); memset(vout,0,sizeof(*vout));
if ( height >= 0 && height < coin->chain->bundlesize*coin->bundlescount && (bp= coin->bundles[height / coin->chain->bundlesize]) != 0 && (rdata= bp->ramchain.H.data) != 0 && i < tx->numvouts ) if ( height >= 0 && height < coin->chain->bundlesize*coin->bundlescount && (bp= coin->bundles[height / coin->chain->bundlesize]) != 0 && (rdata= bp->ramchain.H.data) != 0 && i < tx->numvouts )
@ -132,7 +132,7 @@ int32_t iguana_voutset(struct iguana_info *coin,uint8_t *scriptspace,char *asmst
vout->value = u->value; vout->value = u->value;
vout->pk_script = scriptspace; vout->pk_script = scriptspace;
scriptlen = iguana_voutscript(coin,bp,scriptspace,asmstr,u,&P[u->pkind],i); scriptlen = iguana_voutscript(coin,bp,scriptspace,asmstr,u,&P[u->pkind],i);
} else printf("iguana_voutset unexpected path\n"); } else printf("iguana_voutset unexpected path rdata.%p i.%d %d\n",rdata,i,tx->numvouts);
vout->pk_scriptlen = scriptlen; vout->pk_scriptlen = scriptlen;
if ( err != 0 ) if ( err != 0 )
return(-err); return(-err);

Loading…
Cancel
Save