Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
36c0d5245f
  1. 9
      iguana/iguana_unspents.c

9
iguana/iguana_unspents.c

@ -470,22 +470,21 @@ int32_t iguana_balancegen(struct iguana_info *coin,struct iguana_bundle *bp,int3
now = (uint32_t)time(NULL);
if ( spentbp != 0 && unspentind > 0 && unspentind < spentbp->ramchain.H.data->numunspents )
{
if ( spentbp->dirty == 0 )
if ( spentbp->dirty++ > 100 )
{
spentbp->dirty = now;
printf("prefetch.[%d]\n",spentbp->hdrsi);
iguana_ramchain_prefetch(coin,&spentbp->ramchain);
}
if ( incremental == 0 )
//if ( incremental == 0 )
{
if ( spentbp->ramchain.Uextras == 0 )
{
printf("alloc Uextras.[%d]\n",spentbp->hdrsi);
//printf("alloc Uextras.[%d]\n",spentbp->hdrsi);
spentbp->ramchain.Uextras = calloc(sizeof(*spentbp->ramchain.Uextras),spentbp->ramchain.H.data->numunspents + 16);
}
if ( spentbp->ramchain.A == 0 )
{
printf("alloc A2.[%d]\n",spentbp->hdrsi);
//printf("alloc A2.[%d]\n",spentbp->hdrsi);
spentbp->ramchain.A = calloc(sizeof(*spentbp->ramchain.A),spentbp->ramchain.H.data->numpkinds + 16);
}
}

Loading…
Cancel
Save