From 877a2537f746b64ce42bc842984ed7904fb055ac Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 6 Jun 2017 18:33:49 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 58c952f0b..c63d58810 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -159,10 +159,15 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i { nonz = 0; if ( (++counter % 2000) == 0 ) + { + printf("start privkey updates\n"); LP_privkey_updates(mypeer,pubsock,passphrase,amclient); + printf("done privkey updates\n"); + } if ( (counter % 500) == 0 ) { char str[65]; + printf("start utxos updates\n"); HASH_ITER(hh,LP_utxoinfos,utxo,utmp) { now = (uint32_t)time(NULL); @@ -187,8 +192,10 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i } } } + printf("done utxos updates\n"); } now = (uint32_t)time(NULL); + printf("start peers updates\n"); HASH_ITER(hh,LP_peerinfos,peer,tmp) { if ( now > peer->lastpeers+60 && peer->numpeers > 0 && (peer->numpeers != mypeer->numpeers || (rand() % 10000) == 0) ) @@ -227,6 +234,7 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i nn_freemsg(ptr), ptr = 0; } } + printf("done peers updates\n"); while ( pullsock >= 0 && (recvsize= nn_recv(pullsock,&ptr,NN_MSG,0)) >= 0 ) { nonz++; @@ -250,6 +258,7 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i } if ( nonz == 0 ) usleep(50000); + printf("nonz.%d in mainloop\n",nonz); } } }