From 2b14c3f9bc6d08bdd4489c053cfddd9c46acd0c2 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Jun 2017 10:33:37 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index aad9241a2..8db037e1e 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -161,9 +161,12 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i { HASH_ITER(hh,LP_utxoinfos,utxo,utmp) { - if ( strcmp(utxo->coin,"KMD") == 0 ) - LP_priceping(pubsock,utxo,"BTC",profitmargin); - else LP_priceping(pubsock,utxo,"KMD",profitmargin); + if ( strcmp(utxo->ipaddr,mypeer->ipaddr) == 0 && utxo->port == mypeer->port ) + { + if ( strcmp(utxo->coin,"KMD") == 0 ) + LP_priceping(pubsock,utxo,"BTC",profitmargin); + else LP_priceping(pubsock,utxo,"KMD",profitmargin); + } } } HASH_ITER(hh,LP_peerinfos,peer,tmp)