|
@ -451,8 +451,8 @@ int32_t iguana_bundleiters(struct iguana_info *coin,struct iguana_bundle *bp,int |
|
|
coin->numbundlesQ--; |
|
|
coin->numbundlesQ--; |
|
|
if ( bp->numhashes < bp->n && bp->bundleheight < coin->longestchain-coin->chain->bundlesize ) |
|
|
if ( bp->numhashes < bp->n && bp->bundleheight < coin->longestchain-coin->chain->bundlesize ) |
|
|
{ |
|
|
{ |
|
|
printf("ITERATE bundle.%d vs %d: h.%d n.%d r.%d s.%d finished.%d speculative.%p\n",bp->bundleheight,coin->longestchain-coin->chain->bundlesize,bp->numhashes,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish,bp->speculative); |
|
|
printf("hdr ITERATE bundle.%d vs %d: h.%d n.%d r.%d s.%d finished.%d speculative.%p\n",bp->bundleheight,coin->longestchain-coin->chain->bundlesize,bp->numhashes,bp->n,bp->numrecv,bp->numsaved,bp->emitfinish,bp->speculative); |
|
|
if ( bp->speculative == 0 ) |
|
|
if ( bp->speculative == 0 || bp->numhashes < 3 ) |
|
|
{ |
|
|
{ |
|
|
char str[64]; |
|
|
char str[64]; |
|
|
queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(bits256_str(str,bp->hashes[0])),1); |
|
|
queue_enqueue("hdrsQ",&coin->hdrsQ,queueitem(bits256_str(str,bp->hashes[0])),1); |
|
@ -896,16 +896,17 @@ int32_t iguana_reqhdrs(struct iguana_info *coin) |
|
|
{ |
|
|
{ |
|
|
for (i=0; i<coin->bundlescount; i++) |
|
|
for (i=0; i<coin->bundlescount; i++) |
|
|
{ |
|
|
{ |
|
|
if ( (bp= coin->bundles[i]) != 0 && bp->emitfinish < coin->startutc ) |
|
|
if ( (bp= coin->bundles[i]) != 0 && bp->numhashes < bp->n )//bp->emitfinish < coin->startutc )
|
|
|
{ |
|
|
{ |
|
|
if ( i == coin->bundlescount-1 ) |
|
|
if ( i == coin->bundlescount-1 ) |
|
|
lag = 30; |
|
|
lag = 30; |
|
|
else lag = 30 + (rand() % 30); |
|
|
else lag = 30 + (rand() % 30); |
|
|
|
|
|
lag = 10; |
|
|
//if ( i < coin->bundlescount-1 && (bp->numhashes >= (rand() % bp->n) || time(NULL) < bp->hdrtime+lag) )
|
|
|
//if ( i < coin->bundlescount-1 && (bp->numhashes >= (rand() % bp->n) || time(NULL) < bp->hdrtime+lag) )
|
|
|
// continue;
|
|
|
// continue;
|
|
|
if ( bp->numhashes < bp->n && bp->bundleheight+bp->numhashes < coin->longestchain && time(NULL) > bp->issuetime+lag ) |
|
|
if ( bp->bundleheight+bp->numhashes < coin->longestchain && time(NULL) > bp->issuetime+lag ) |
|
|
{ |
|
|
{ |
|
|
//printf("LAG.%ld hdrsi.%d numhashes.%d:%d needhdrs.%d qsize.%d zcount.%d\n",time(NULL)-bp->hdrtime,i,bp->numhashes,bp->n,iguana_needhdrs(coin),queue_size(&coin->hdrsQ),coin->zcount);
|
|
|
printf("LAG.%ld hdrsi.%d numhashes.%d:%d needhdrs.%d qsize.%d zcount.%d\n",time(NULL)-bp->hdrtime,i,bp->numhashes,bp->n,iguana_needhdrs(coin),queue_size(&coin->hdrsQ),coin->zcount); |
|
|
if ( bp->issuetime == 0 ) |
|
|
if ( bp->issuetime == 0 ) |
|
|
coin->numpendings++; |
|
|
coin->numpendings++; |
|
|
char str[65]; |
|
|
char str[65]; |
|
|