Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
4734daf0e5
  1. 2
      iguana/iguana777.c
  2. 2
      iguana/iguana_msg.c
  3. 2
      iguana/iguana_peers.c

2
iguana/iguana777.c

@ -271,7 +271,7 @@ void iguana_bundleQ(struct iguana_info *coin,struct iguana_bundle *bp,int32_t ti
if ( 0 && bp->queued == 0 && bp->emitfinish <= 1 && iguana_bundleready(coin,bp,0) == bp->n ) if ( 0 && bp->queued == 0 && bp->emitfinish <= 1 && iguana_bundleready(coin,bp,0) == bp->n )
printf("bundle.[%d] is ready\n",bp->hdrsi); printf("bundle.[%d] is ready\n",bp->hdrsi);
bp->queued = (uint32_t)time(NULL); bp->queued = (uint32_t)time(NULL);
ptr = mycalloc('i',1,sizeof(*ptr)); ptr = mycalloc('q',1,sizeof(*ptr));
ptr->allocsize = sizeof(*ptr); ptr->allocsize = sizeof(*ptr);
ptr->coin = coin; ptr->coin = coin;
ptr->bp = bp, ptr->hdrsi = bp->hdrsi; ptr->bp = bp, ptr->hdrsi = bp->hdrsi;

2
iguana/iguana_msg.c

@ -931,7 +931,7 @@ int32_t iguana_msgparser(struct iguana_info *coin,struct iguana_peer *addr,struc
if ( rawmem->totalsize == 0 ) if ( rawmem->totalsize == 0 )
iguana_meminit(rawmem,"bighdrs",0,IGUANA_MAXPACKETSIZE * 2,0); iguana_meminit(rawmem,"bighdrs",0,IGUANA_MAXPACKETSIZE * 2,0);
memset(prevhash2.bytes,0,sizeof(prevhash2)); memset(prevhash2.bytes,0,sizeof(prevhash2));
zblocks = mycalloc('i',1,(int32_t)(sizeof(struct iguana_zblock) * n)); zblocks = mycalloc('z',1,(int32_t)(sizeof(struct iguana_zblock) * n));
//printf("%s got %d headers len.%d\n",coin->symbol,n,recvlen); //printf("%s got %d headers len.%d\n",coin->symbol,n,recvlen);
for (i=0; i<n; i++) for (i=0; i<n; i++)
{ {

2
iguana/iguana_peers.c

@ -120,7 +120,7 @@ struct iguana_iAddr *iguana_iAddrhashset(struct iguana_info *coin,struct iguana_
portable_mutex_lock(&coin->peers_mutex); portable_mutex_lock(&coin->peers_mutex);
if ( (item= _iguana_hashfind(coin,(uint32_t)iA->ipbits)) == 0 ) if ( (item= _iguana_hashfind(coin,(uint32_t)iA->ipbits)) == 0 )
{ {
tmp = mycalloc('i',1,sizeof(*iA)); tmp = mycalloc('p',1,sizeof(*iA));
*tmp = *iA; *tmp = *iA;
iA = tmp; iA = tmp;
if ( ind <= 0 ) if ( ind <= 0 )

Loading…
Cancel
Save