jl777 8 years ago
parent
commit
4b1c69cb1f
  1. 4
      iguana/iguana_msg.c
  2. 4
      iguana/iguana_peers.c

4
iguana/iguana_msg.c

@ -1019,9 +1019,9 @@ int32_t iguana_msgparser(struct supernet_info *myinfo,struct iguana_info *coin,s
{ {
bits256 auxhash2,prevhash2; struct iguana_msgtx *tx; struct iguana_msgmerkle *coinbase_branch=0,*blockchain_branch=0; struct iguana_msgblock parentblock; bits256 auxhash2,prevhash2; struct iguana_msgtx *tx; struct iguana_msgmerkle *coinbase_branch=0,*blockchain_branch=0; struct iguana_msgblock parentblock;
if ( rawmem->totalsize == 0 ) if ( rawmem->totalsize == 0 )
iguana_meminit(rawmem,"bighdrs",0,IGUANA_MAXPACKETSIZE * 2,0); iguana_meminit(rawmem,"bighdrs",0,IGUANA_MAXPACKETSIZE * 4,0);
memset(prevhash2.bytes,0,sizeof(prevhash2)); memset(prevhash2.bytes,0,sizeof(prevhash2));
zblocks = mycalloc('z',1,(int32_t)(sizeof(struct iguana_zblock) * n * 2)); 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++)
{ {

4
iguana/iguana_peers.c

@ -598,9 +598,9 @@ int32_t iguana_recv(char *ipaddr,int32_t usock,uint8_t *recvbuf,int32_t len)
void iguana_peer_meminit(struct iguana_info *coin,struct iguana_peer *addr) void iguana_peer_meminit(struct iguana_info *coin,struct iguana_peer *addr)
{ {
if ( addr->RAWMEM.ptr == 0 ) if ( addr->RAWMEM.ptr == 0 )
iguana_meminit(&addr->RAWMEM,addr->ipaddr,0,IGUANA_MAXPACKETSIZE * 2,0); iguana_meminit(&addr->RAWMEM,addr->ipaddr,0,IGUANA_MAXPACKETSIZE * 3,0);
if ( addr->TXDATA.ptr == 0 ) if ( addr->TXDATA.ptr == 0 )
iguana_meminit(&addr->TXDATA,"txdata",0,IGUANA_MAXPACKETSIZE * 2,0); iguana_meminit(&addr->TXDATA,"txdata",0,IGUANA_MAXPACKETSIZE * 3,0);
if ( addr->HASHMEM.ptr == 0 ) if ( addr->HASHMEM.ptr == 0 )
iguana_meminit(&addr->HASHMEM,"HASHPTRS",0,256,0);//IGUANA_MAXPACKETSIZE*16,0); iguana_meminit(&addr->HASHMEM,"HASHPTRS",0,256,0);//IGUANA_MAXPACKETSIZE*16,0);
//printf("Init %s memory %p %p %p\n",addr->ipaddr,addr->RAWMEM.ptr,addr->TXDATA.ptr,addr->HASHMEM.ptr); //printf("Init %s memory %p %p %p\n",addr->ipaddr,addr->RAWMEM.ptr,addr->TXDATA.ptr,addr->HASHMEM.ptr);

Loading…
Cancel
Save