Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
15ff8d17ff
  1. 2
      iguana/iguana777.c
  2. 9
      iguana/iguana_bundles.c
  3. 4
      iguana/iguana_recv.c

2
iguana/iguana777.c

@ -444,7 +444,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers,
if ( (coin->MAXRECVCACHE= maxrecvcache) == 0 )
coin->MAXRECVCACHE = IGUANA_MAXRECVCACHE;
if ( (coin->MAXPENDING= maxpending) <= 0 )
coin->MAXPENDING = (strcmp(symbol,"BTC") == 0) ? _IGUANA_MAXPENDING : _IGUANA_MAXPENDING*256;
coin->MAXPENDING = (strcmp(symbol,"BTC") == 0) ? _IGUANA_MAXPENDING : _IGUANA_MAXPENDING*64;
if ( (coin->MAXBUNDLES= maxbundles) <= 0 )
coin->MAXBUNDLES = (strcmp(symbol,"BTC") == 0) ? _IGUANA_MAXBUNDLES : _IGUANA_MAXBUNDLES*64;
coin->myservices = services;

9
iguana/iguana_bundles.c

@ -565,8 +565,11 @@ void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_
int32_t i,n,pend; uint32_t now; struct iguana_block *block; double endmillis;
for (i=pend=0; i<IGUANA_MAXPEERS; i++)
pend += coin->peers.active[i].pendblocks;
//if ( pend >= coin->MAXPENDING*coin->MAXPEERS )
// return;
if ( pend >= coin->MAXPENDING*coin->MAXPEERS )
{
printf("SKIP pend.%d ITERATE bundle.%d n.%d r.%d s.%d finished.%d\n",pend,bp->bundleheight,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish);
return;
}
endmillis = OS_milliseconds() + timelimit;
printf("ITERATE bundle.%d n.%d r.%d s.%d finished.%d\n",bp->bundleheight,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish);
memset(bp->issued,0,sizeof(bp->issued));
@ -599,6 +602,6 @@ void iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int32_
iguana_emitQ(coin,bp);
return;
}
iguana_bundleQ(coin,bp,timelimit);
iguana_bundleQ(coin,bp,1000);
}
}

4
iguana/iguana_recv.c

@ -310,7 +310,7 @@ uint32_t iguana_allhashcmp(struct iguana_info *coin,struct iguana_bundle *bp,bit
}
//printf("ALLHASHES FOUND! %d requested.%d\n",bp->bundleheight,n);
bp->queued = (uint32_t)time(NULL);
iguana_bundleQ(coin,bp,1000 + (rand() % 2000));
iguana_bundleQ(coin,bp,500 + (rand() % 500));
return(bp->queued);
}
}
@ -794,7 +794,7 @@ int32_t iguana_processrecv(struct iguana_info *coin) // single threaded
if ( memcmp(next->RO.prev_block.bytes,coin->blocks.hwmchain.RO.hash2.bytes,sizeof(bits256)) == 0 )
{
if ( _iguana_chainlink(coin,next) != 0 )
lflag++;
lflag++, flag++;
//else printf("chainlink error for %d\n",coin->blocks.hwmchain.height+1);
}
if ( 0 )

Loading…
Cancel
Save