From 2f3e3b0446a8639527f0577af535db07b45dc885 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 4 Jun 2017 21:42:30 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 2 +- iguana/exchanges/LP_utxos.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index dbda8d683..6cb4673fb 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -171,7 +171,7 @@ void LP_mainloop(struct LP_peerinfo *mypeer,uint16_t mypubport,int32_t pubsock,i } HASH_ITER(hh,LP_peerinfos,peer,tmp) { - if ( peer->numpeers != mypeer->numpeers || (rand() % 10000) == 0 ) + if ( peer->numpeers > 0 && (peer->numpeers != mypeer->numpeers || (rand() % 10000) == 0) ) { if ( peer->numpeers != mypeer->numpeers ) printf("%s num.%d vs %d\n",peer->ipaddr,peer->numpeers,mypeer->numpeers); diff --git a/iguana/exchanges/LP_utxos.c b/iguana/exchanges/LP_utxos.c index 2a3d74ec7..d84e93386 100644 --- a/iguana/exchanges/LP_utxos.c +++ b/iguana/exchanges/LP_utxos.c @@ -35,7 +35,8 @@ cJSON *LP_inventoryjson(cJSON *item,struct LP_utxoinfo *utxo) jaddstr(item,"address",utxo->coinaddr); jaddbits256(item,"txid",utxo->txid); jaddnum(item,"vout",utxo->vout); - jaddnum(item,"value",dstr(utxo->satoshis)); + jaddnum(item,"value",utxo->value); + jadd64bits(item,"satoshis",utxo->satoshis); jaddbits256(item,"txid2",utxo->txid2); jaddnum(item,"vout2",utxo->vout2); jaddnum(item,"value2",dstr(utxo->satoshis2));