From de8c4145d80a0f7fcce3e1348a68dc748dc2dc96 Mon Sep 17 00:00:00 2001
From: jl777 <jameslee777@yahoo.com>
Date: Fri, 10 Nov 2017 23:48:45 +0200
Subject: [PATCH] Test

---
 iguana/exchanges/LP_cache.c     | 2 +-
 iguana/exchanges/LP_nativeDEX.c | 5 +++--
 iguana/exchanges/LP_socket.c    | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/iguana/exchanges/LP_cache.c b/iguana/exchanges/LP_cache.c
index b0c59611f..c66957bd1 100644
--- a/iguana/exchanges/LP_cache.c
+++ b/iguana/exchanges/LP_cache.c
@@ -93,7 +93,7 @@ void LP_SPV_store(struct iguana_info *coin,bits256 txid,int32_t height)
         sprintf(fname,"%s/UNSPENTS/%s.SPV",GLOBAL_DBDIR,coin->symbol), OS_portable_path(fname);
         if ( (fp= OS_appendfile(fname)) != 0 )
         {
-            //char str[65]; printf("store %s %s.[%d]\n",coin->symbol,bits256_str(str,txid),tx->len);
+            char str[65]; printf("store %s %s.[%d]\n",coin->symbol,bits256_str(str,txid),tx->len);
             fwrite(&tx->txid,1,sizeof(tx->txid),fp);
             fwrite(&tx->len,1,sizeof(tx->len),fp);
             fwrite(&tx->height,1,sizeof(tx->height),fp);
diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c
index 49eca0745..f6f1725d4 100644
--- a/iguana/exchanges/LP_nativeDEX.c
+++ b/iguana/exchanges/LP_nativeDEX.c
@@ -467,7 +467,7 @@ void utxosQ_loop(void *myipaddr)
 
 void LP_coinsloop(void *_coins)
 {
-    struct LP_address *ap=0; cJSON *retjson; struct LP_address_utxo *up,*tmp; struct iguana_info *coin,*ctmp; char str[65]; struct electrum_info *ep,*backupep=0; bits256 zero; int32_t oldht,j,nonz; char *coins = _coins;
+    struct LP_address *ap=0,*atmp; cJSON *retjson; struct LP_address_utxo *up,*tmp; struct iguana_info *coin,*ctmp; char str[65]; struct electrum_info *ep,*backupep=0; bits256 zero; int32_t oldht,j,nonz; char *coins = _coins;
     if ( strcmp("BTC",coins) == 0 )
     {
         strcpy(LP_coinsloopBTC_stats.name,"BTC coin loop");
@@ -515,7 +515,8 @@ void LP_coinsloop(void *_coins)
             {
                 if ( (backupep= ep->prev) == 0 )
                     backupep = ep;
-                if ( (ap= LP_addressfind(coin,coin->smartaddr)) != 0 )
+                HASH_ITER(hh,coin->addresses,ap,atmp)
+                //if ( (ap= LP_addressfind(coin,coin->smartaddr)) != 0 )
                 {
                     DL_FOREACH_SAFE(ap->utxos,up,tmp)
                     {
diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c
index 7b4bac8f4..52dc27212 100644
--- a/iguana/exchanges/LP_socket.c
+++ b/iguana/exchanges/LP_socket.c
@@ -416,7 +416,7 @@ cJSON *electrum_submit(char *symbol,struct electrum_info *ep,cJSON **retjsonp,ch
         {
             *retjsonp = 0;
             sprintf(stratumreq,"{ \"jsonrpc\":\"2.0\", \"id\": %u, \"method\":\"%s\", \"params\": %s }\n",ep->stratumid,method,params);
-//printf("%s %s",symbol,stratumreq);
+printf("%s %s",symbol,stratumreq);
             memset(ep->buf,0,ep->bufsize);
             sitem = electrum_sitem(ep,stratumreq,timeout,retjsonp);
            /*sitem = (struct stritem *)queueitem(stratumreq);