Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
fdf2cc4562
  1. 2
      iguana/iguana_peers.c
  2. 5
      iguana/iguana_unspents.c
  3. 4
      iguana/main.c

2
iguana/iguana_peers.c

@ -607,7 +607,7 @@ void iguana_startconnection(void *arg)
printf("iguana_startconnection.%s mismatched coin.%p (%s) vs (%s)\n",addr->ipaddr,coin,coin->symbol,addr->coinstr);
return;
}
printf("MYSERVICES.%llx\n",(long long)coin->myservices);
//printf("MYSERVICES.%llx\n",(long long)coin->myservices);
if ( strcmp("127.0.0.1",addr->ipaddr) == 0 && (coin->myservices & NODE_NETWORK) != 0 )
{
iguana_iAkill(coin,addr,0);

5
iguana/iguana_unspents.c

@ -247,9 +247,9 @@ uint32_t iguana_sparseadd(uint8_t *bits,uint32_t ind,int32_t width,uint32_t tabl
for (x=j=0; j<width; j++)
{
x <<= 1;
x |= GETBIT(bits,bitoffset+width-1-j) != 0;
x |= GETBIT(bits,bitoffset+j) != 0;
}
if ( x != setind )
//if ( x != setind )
printf("x.%d vs setind.%d ind.%d bitoffset.%d\n",x,setind,ind,(int32_t)bitoffset);
}
if ( i > ramchain->sparsemax )
@ -1374,6 +1374,7 @@ int32_t iguana_balancecalc(struct iguana_info *coin,struct iguana_bundle *bp,int
iguana_validateQ(coin,bp);
return(flag);
}
bp->nexttime = (uint32_t)time(NULL) + 1 + cbrt(bp->hdrsi);
if ( bp != 0 && coin != 0 && (bp->hdrsi == 0 || (prevbp= coin->bundles[bp->hdrsi-1]) != 0) )
{
#ifdef IGUANA_SERIALIZE_BALANCEGEN

4
iguana/main.c

@ -363,13 +363,13 @@ void mainloop(struct supernet_info *myinfo)
flag++;
if ( (ptr= queue_dequeue(&balancesQ,0)) != 0 )
{
if ( ptr->coin != coin )
if ( ptr->coin != coin || (bp= ptr->bp) == 0 || time(NULL) < bp->nexttime )
{
queue_enqueue("balanceQ",&balancesQ,&ptr->DL,0);
continue;
}
flag++;
if ( coin != 0 && (bp= ptr->bp) != 0 )
if ( coin != 0 )
{
iguana_balancecalc(coin,bp,bp->bundleheight,bp->bundleheight+bp->n-1);
if ( coin->active == 0 )

Loading…
Cancel
Save