Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
5b3f9b5ed3
  1. 3
      iguana/iguana_tx.c
  2. 2
      includes/iguana_structs.h

3
iguana/iguana_tx.c

@ -278,8 +278,9 @@ int32_t iguana_peerblockrequest(struct iguana_info *coin,uint8_t *blockspace,int
merkle_root = iguana_merkle(tree,block->RO.txn_count); merkle_root = iguana_merkle(tree,block->RO.txn_count);
if ( bits256_cmp(merkle_root,block->RO.merkle_root) == 0 ) if ( bits256_cmp(merkle_root,block->RO.merkle_root) == 0 )
{ {
if ( addr != 0 ) if ( addr != 0 && addr->lastsent != block->height )
{ {
addr->lastsent = block->height;
printf("Sendlen.%d block.%d %s to %s\n",total,block->height,bits256_str(str,block->RO.hash2),addr->ipaddr); printf("Sendlen.%d block.%d %s to %s\n",total,block->height,bits256_str(str,block->RO.hash2),addr->ipaddr);
if ( 0 ) if ( 0 )
{ {

2
includes/iguana_structs.h

@ -307,7 +307,7 @@ struct iguana_peer
char ipaddr[64],lastcommand[16],coinname[64],symbol[64]; char ipaddr[64],lastcommand[16],coinname[64],symbol[64];
uint64_t pingnonce,totalsent,totalrecv,ipbits; double pingtime,sendmillis,pingsum,getdatamillis; uint64_t pingnonce,totalsent,totalrecv,ipbits; double pingtime,sendmillis,pingsum,getdatamillis;
uint32_t lastcontact,sendtime,ready,startsend,startrecv,pending,lastgotaddr,lastblockrecv,pendtime,lastflush,lastpoll,myipbits,persistent_peer,protover; uint32_t lastcontact,sendtime,ready,startsend,startrecv,pending,lastgotaddr,lastblockrecv,pendtime,lastflush,lastpoll,myipbits,persistent_peer,protover;
int32_t supernet,basilisk,dead,addrind,usock,lastheight,relayflag,numpackets,numpings,ipv6,height,rank,pendhdrs,pendblocks,recvhdrs,lastlefti,validpub,othervalid,dirty[2],laggard,headerserror; int32_t supernet,basilisk,dead,addrind,usock,lastheight,relayflag,numpackets,numpings,ipv6,height,rank,pendhdrs,pendblocks,recvhdrs,lastlefti,validpub,othervalid,dirty[2],laggard,headerserror,lastsent;
double recvblocks,recvtotal; double recvblocks,recvtotal;
int64_t allocated,freed; int64_t allocated,freed;
bits256 RThashes[IGUANA_MAXBUNDLESIZE]; int32_t numRThashes; bits256 RThashes[IGUANA_MAXBUNDLESIZE]; int32_t numRThashes;

Loading…
Cancel
Save