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));