Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
4abe904d4a
  1. 23
      iguana/iguana_unspents.c

23
iguana/iguana_unspents.c

@ -433,12 +433,6 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp,int3
printf("BALANCEGEN.%d hdrs.%d\n",bp->bundleheight,bp->hdrsi); printf("BALANCEGEN.%d hdrs.%d\n",bp->bundleheight,bp->hdrsi);
for (spendind=ramchain->H.data->firsti; spendind<n; spendind++) for (spendind=ramchain->H.data->firsti; spendind<n; spendind++)
{ {
if ( spendind == nextT[numtxid].firstvin )
{
refheight = bp->bundleheight + numtxid;
//printf("height.%d firstvin.%d\n",height,nextT[numtxid].firstvin);
numtxid++;
}
if ( refheight < startheight ) if ( refheight < startheight )
{ {
printf("balancegen: refheight.%d < startheight.%d\n",refheight,startheight); printf("balancegen: refheight.%d < startheight.%d\n",refheight,startheight);
@ -496,7 +490,16 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp,int3
} }
//printf("[%d] spendind.%d -> (hdrsi.%d u%d)\n",bp->hdrsi,spendind,hdrsi,unspentind); //printf("[%d] spendind.%d -> (hdrsi.%d u%d)\n",bp->hdrsi,spendind,hdrsi,unspentind);
} }
else continue; else
{
if ( spendind == nextT[numtxid].firstvin )
{
refheight = bp->bundleheight + numtxid;
//printf("height.%d firstvin.%d\n",height,nextT[numtxid].firstvin);
numtxid++;
}
continue;
}
if ( (spendind & 0xff) == 1 ) if ( (spendind & 0xff) == 1 )
now = (uint32_t)time(NULL); now = (uint32_t)time(NULL);
if ( spentbp != 0 && unspentind > 0 && unspentind < spentbp->ramchain.H.data->numunspents ) if ( spentbp != 0 && unspentind > 0 && unspentind < spentbp->ramchain.H.data->numunspents )
@ -580,6 +583,12 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp,int3
errs++; errs++;
printf("iguana_balancegen: error with unspentind.%d vs max.%d spentbp.%p\n",unspentind,spentbp!=0?spentbp->ramchain.H.data->numunspents:-1,spentbp); printf("iguana_balancegen: error with unspentind.%d vs max.%d spentbp.%p\n",unspentind,spentbp!=0?spentbp->ramchain.H.data->numunspents:-1,spentbp);
} }
if ( spendind == nextT[numtxid].firstvin )
{
refheight = bp->bundleheight + numtxid;
//printf("height.%d firstvin.%d\n",height,nextT[numtxid].firstvin);
numtxid++;
}
} }
if ( numtxid != bp->ramchain.H.data->numtxids ) if ( numtxid != bp->ramchain.H.data->numtxids )
{ {

Loading…
Cancel
Save