From 5b3f9b5ed36e6889f1080eee6a67b4279b59b473 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 11 Jun 2016 23:50:27 -0300 Subject: [PATCH] test --- iguana/iguana_tx.c | 3 ++- includes/iguana_structs.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_tx.c b/iguana/iguana_tx.c index cf0b0633b..afdf5e1f5 100755 --- a/iguana/iguana_tx.c +++ b/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); 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); if ( 0 ) { diff --git a/includes/iguana_structs.h b/includes/iguana_structs.h index 73bcbb277..3a1146747 100755 --- a/includes/iguana_structs.h +++ b/includes/iguana_structs.h @@ -307,7 +307,7 @@ struct iguana_peer char ipaddr[64],lastcommand[16],coinname[64],symbol[64]; 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; - 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; int64_t allocated,freed; bits256 RThashes[IGUANA_MAXBUNDLESIZE]; int32_t numRThashes;