|
@ -160,12 +160,15 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i |
|
|
if ( (counter % 500) == 0 ) |
|
|
if ( (counter % 500) == 0 ) |
|
|
{ |
|
|
{ |
|
|
HASH_ITER(hh,LP_utxoinfos,utxo,utmp) |
|
|
HASH_ITER(hh,LP_utxoinfos,utxo,utmp) |
|
|
|
|
|
{ |
|
|
|
|
|
if ( strcmp(utxo->ipaddr,mypeer->ipaddr) == 0 && utxo->port == mypeer->port ) |
|
|
{ |
|
|
{ |
|
|
if ( strcmp(utxo->coin,"KMD") == 0 ) |
|
|
if ( strcmp(utxo->coin,"KMD") == 0 ) |
|
|
LP_priceping(pubsock,utxo,"BTC",profitmargin); |
|
|
LP_priceping(pubsock,utxo,"BTC",profitmargin); |
|
|
else LP_priceping(pubsock,utxo,"KMD",profitmargin); |
|
|
else LP_priceping(pubsock,utxo,"KMD",profitmargin); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
HASH_ITER(hh,LP_peerinfos,peer,tmp) |
|
|
HASH_ITER(hh,LP_peerinfos,peer,tmp) |
|
|
{ |
|
|
{ |
|
|
if ( peer->numpeers != mypeer->numpeers || (rand() % 10000) == 0 ) |
|
|
if ( peer->numpeers != mypeer->numpeers || (rand() % 10000) == 0 ) |
|
|