Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
53faa42fd9
  1. 4
      iguana/iguana_bundles.c
  2. 6
      iguana/iguana_recv.c

4
iguana/iguana_bundles.c

@ -565,8 +565,8 @@ 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 )
// 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));

6
iguana/iguana_recv.c

@ -677,7 +677,7 @@ int32_t iguana_blockQ(struct iguana_info *coin,struct iguana_bundle *bp,int32_t
queue_enqueue(str,Q,&req->DL,0);
return(1);
} else printf("null Q\n");
} else printf("queueblock skip priority.%d bundlei.%d\n",bundlei,priority);
} //else printf("queueblock skip priority.%d bundlei.%d\n",bundlei,priority);
return(0);
}
@ -715,11 +715,11 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr)
}
if ( bp == 0 || z != 0 )
{
printf("%s request hdr.(%s) numhashes.%d\n",addr!=0?addr->ipaddr:"local",hashstr,bp->numhashes);
//printf("%s request hdr.(%s) numhashes.%d\n",addr!=0?addr->ipaddr:"local",hashstr,bp->numhashes);
iguana_send(coin,addr,serialized,datalen);
addr->pendhdrs++;
flag++;
} else printf("skip hdrreq.%d numhashes.%d\n",bp->bundleheight,bp->numhashes);
} //else printf("skip hdrreq.%d numhashes.%d\n",bp->bundleheight,bp->numhashes);
}
free_queueitem(hashstr);
return(flag);

Loading…
Cancel
Save