From b1e71e6af88e4e9b61fb7107d91cacb8cde05960 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 14 Jun 2017 16:20:08 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 4 +++- iguana/exchanges/LP_utxos.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 9dc4042df..aa74ebaab 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -194,12 +194,14 @@ void LP_peer_utxosquery(struct LP_peerinfo *mypeer,uint16_t myport,int32_t pubso int32_t lastn; if ( now > peer->lastutxos+interval ) { - peer->lastutxos = now; //lastn = peer->numutxos - mypeer->numutxos + LP_PROPAGATION_SLACK; //if ( lastn < LP_PROPAGATION_SLACK * 2 ) lastn = LP_PROPAGATION_SLACK * 2; if ( mypeer == 0 || strcmp(peer->ipaddr,mypeer->ipaddr) != 0 ) + { + peer->lastutxos = now; LP_utxosquery(mypeer,pubsock,peer->ipaddr,peer->port,"",lastn,mypeer != 0 ? mypeer->ipaddr : "127.0.0.1",myport,profitmargin); + } } } diff --git a/iguana/exchanges/LP_utxos.c b/iguana/exchanges/LP_utxos.c index bf159a018..e03857022 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -476,10 +476,12 @@ void LP_utxosquery(struct LP_peerinfo *mypeer,int32_t mypubsock,char *destipaddr peer = LP_peerfind((uint32_t)calc_ipbits(destipaddr),destport); if ( coin == 0 ) coin = ""; + printf("utxo query\n"); if ( (retstr= issue_LP_getutxos(destipaddr,destport,coin,lastn,myipaddr,myport,myprofit,mypeer != 0 ? mypeer->numpeers : 0,mypeer != 0 ? mypeer->numutxos : 0)) != 0 ) { now = (uint32_t)time(NULL); LP_utxosparse(mypubsock,destipaddr,destport,retstr,now); + printf("got.(%s)\n",retstr); free(retstr); /*i = 0; if ( lastn >= mypeer->numutxos )