jl777 8 years ago
parent
commit
06811ddf27
  1. 6
      iguana/iguana_msg.c
  2. 2
      iguana/iguana_recv.c
  3. 4
      includes/iguana_structs.h

6
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 * 4,0); iguana_meminit(rawmem,"bighdrs",0,IGUANA_MAXPACKETSIZE * 3,0);
memset(prevhash2.bytes,0,sizeof(prevhash2)); memset(prevhash2.bytes,0,sizeof(prevhash2));
zblocks = mycalloc('z',2,(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++)
{ {
@ -1057,7 +1057,7 @@ int32_t iguana_msgparser(struct supernet_info *myinfo,struct iguana_info *coin,s
free(coinbase_branch); free(coinbase_branch);
if ( blockchain_branch != 0 ) if ( blockchain_branch != 0 )
free(blockchain_branch); free(blockchain_branch);
if ( iguana_gotheadersM(coin,addr,zblocks,n) < 0 ) if ( 1 || iguana_gotheadersM(coin,addr,zblocks,n) < 0 )
myfree(zblocks,(int32_t)(sizeof(struct iguana_zblock) * n)); myfree(zblocks,(int32_t)(sizeof(struct iguana_zblock) * n));
//myfree(blocks,sizeof(*blocks) * n); //myfree(blocks,sizeof(*blocks) * n);
if ( len == recvlen && addr != 0 ) if ( len == recvlen && addr != 0 )

2
iguana/iguana_recv.c

@ -2206,7 +2206,7 @@ int32_t iguana_pollQsPT(struct iguana_info *coin,struct iguana_peer *addr)
} }
priority = 1; priority = 1;
pend = 0; pend = 0;
req = 0;//queue_dequeue(&coin->priorityQ); req = queue_dequeue(&coin->priorityQ);
if ( flag == 0 && req == 0 && addr->pendblocks < limit ) if ( flag == 0 && req == 0 && addr->pendblocks < limit )
{ {
priority = 0; priority = 0;

4
includes/iguana_structs.h

@ -248,7 +248,7 @@ struct iguana_counts
uint32_t firsttxidind,firstunspentind,firstspendind,firstpkind; uint32_t firsttxidind,firstunspentind,firstspendind,firstpkind;
uint64_t credits,debits; uint64_t credits,debits;
struct iguana_block block; struct iguana_block block;
}PACKEDSTRUCT; } PACKEDSTRUCT;
struct iguana_blocks struct iguana_blocks
{ {
@ -263,7 +263,7 @@ struct iguana_ledger
{ {
struct iguana_counts snapshot; struct iguana_counts snapshot;
//struct iguana_account accounts[]; //struct iguana_account accounts[];
}PACKEDSTRUCT; } PACKEDSTRUCT;
// ramchain temp file structures // ramchain temp file structures
struct iguana_unspent20 { uint64_t value; uint32_t scriptpos,txidind:28,type:4; uint16_t scriptlen,fileid; uint8_t rmd160[20]; }PACKEDSTRUCT; struct iguana_unspent20 { uint64_t value; uint32_t scriptpos,txidind:28,type:4; uint16_t scriptlen,fileid; uint8_t rmd160[20]; }PACKEDSTRUCT;

Loading…
Cancel
Save