Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
01b2ec8783
  1. 4
      iguana/iguana_unspents.c

4
iguana/iguana_unspents.c

@ -265,7 +265,7 @@ int32_t iguana_utxogen(struct iguana_info *coin,struct iguana_bundle *bp)
{ {
if ( (spentbp= iguana_spent(coin,&prevhash,&unspentind,ramchain,bp->hdrsi,s)) != 0 ) if ( (spentbp= iguana_spent(coin,&prevhash,&unspentind,ramchain,bp->hdrsi,s)) != 0 )
{ {
if ( (ptr[emit].ind= unspentind) != 0 ) if ( (ptr[emit].ind= unspentind) != 0 && spentbp->hdrsi < bp->hdrsi )
{ {
ptr[emit].hdrsi = spentbp->hdrsi; ptr[emit].hdrsi = spentbp->hdrsi;
//printf("(%d u%d).%d ",spentbp->hdrsi,unspentind,emit); //printf("(%d u%d).%d ",spentbp->hdrsi,unspentind,emit);
@ -352,7 +352,7 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp)
else else
{ {
unspentind = ramchain->Xspendinds[emit].ind; unspentind = ramchain->Xspendinds[emit].ind;
if ( (hdrsi= ramchain->Xspendinds[emit].hdrsi) >= 0 && hdrsi < coin->bundlescount ) if ( (hdrsi= ramchain->Xspendinds[emit].hdrsi) >= 0 && hdrsi <= bp->hdrsi )
spentbp = coin->bundles[hdrsi]; spentbp = coin->bundles[hdrsi];
else else
{ {

Loading…
Cancel
Save